Skip to content

Commit 4cdbd46

Browse files
Experiment
1 parent 07b1ed7 commit 4cdbd46

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/demo.html

+8-1
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,17 @@ <h1>MicroPython-micro:bit simulator example embedding</h1>
231231
});
232232
fetchProgram(sample.value);
233233

234+
document
235+
.querySelector("#flash")
236+
.addEventListener("click", async () => {});
237+
234238
document.querySelector("#stop").addEventListener("click", async () => {
235239
simulator.postMessage(
236240
{
237-
kind: "stop",
241+
kind: "flash",
242+
filesystem: {
243+
"main.py": new TextEncoder().encode(program.value),
244+
},
238245
},
239246
"*"
240247
);

0 commit comments

Comments
 (0)