FlasheIDE

IDE

Write and run MicroPython on your board, right here: open its files, install packages into lib/, and talk to it in the terminal. files run in the browser.

~/board
Ctrl/⌘+Enter runs · Ctrl/⌘+S saves · Ctrl+Shift+P all commands

Nothing open yet.

Open a file from the board, make a , write an , or start from a starter project.

files run right here in the browser, or on an Espruino board.


                
                
○ No board MicroPythonUTF-8

JavaScript in the browser

A .js or .ts file runs in this browser when you press Run, with no board needed (with an Espruino board connected, it runs on the board instead; see below). It runs in a sealed-off sandbox, so it can't read anything the IDE keeps (your drafts, sketches or drive access), even if the file came from a link. console.log prints to the terminal, top-level await works, and Stop ends it. The run ends once the file, its timers and anything it started without awaiting (a fetch, a serial read, an open WebSocket) are done; a setInterval keeps it running until Stop.

With a MicroPython board connected, or the Serial monitor open, the script can talk to it through serial. What the board sends still shows in the terminal.

await serial.write(text)
Send text as it is: "print(1 + 1)\r" at a MicroPython prompt, "\x03" for Ctrl-C.
await serial.writeLine(text, ending)
Send text and a line ending ("\r\n" unless you give another).
await serial.readLine(timeout)
The next line the board sends, without its line ending. Waits up to timeout ms (5000 by default), then throws.
await serial.waitFor(pattern, timeout)
Everything up to and including the first match of a string or a RegExp, such as ">>> " for the prompt.
serial.clear()
Forget what has arrived and not been read yet. Only what arrives after you press Run is kept.
// Ask a MicroPython board for its free memory
await serial.write("import gc; print(gc.mem_free())\r");
await serial.readLine();                 // the board echoes the line back first
console.log("free:", await serial.readLine(), "bytes");

Espruino boards

Espruino boards run JavaScript themselves. Press Espruino next to Connect and pick the board's port: Run then sends the open .js or .ts file to the board (a .ts file has its types stripped first), and the board keeps running what it set up after the upload. Fresh start sends reset() first; Stop sends Ctrl-C and clears the board's timers and watches; Restart board sends load(), which runs the code saved on it. The terminal line runs JavaScript at the board's prompt.

It works with boards that show up as a serial port: the Espruino Original, Pico and WiFi, and Espruino builds for ESP32, ESP8266 and STM32 boards (those talk at 115200 baud; change Baud if yours differs). Bluetooth boards such as Puck.js, Pixl.js and Bangle.js need Espruino's own Web IDE, at espruino.com/ide. Tested with a pretend board so far, not a real one.

Arduino examples

Arduino's built-in examples. One opens as a sketch of its own, and builds without signing in, because it's built already for every Arduino board here.

From Arduino's built-in examples, in the public domain.

Upload a compiled sketch

Upload to the board