Simulator

Free online MicroPython simulator for the Raspberry Pi Pico

Mokxi is a free MicroPython simulator that runs in your browser, with nothing to install and no account needed. The Pico runs the official MicroPython v1.29.0 firmware, byte for byte as micropython.org publishes it, on our own model of the RP2040. Your main.py is copied onto the board the way Thonny copies it, and machine.Pin, PWM, ADC, I2C and SPI drive the circuit. Nothing in the page interprets your Python.

  • 455parts on the bench
  • 43boards running now
  • 1.00xreal time, on every board
Pico: MicroPython knob dimmerlive0.000 s 0.00x
Click to open it in the editor
The official MicroPython firmware, running main.py right now on our own RP2040. Click it to open the circuit in the editor.
What is modeled

The numbers, not the marketing

Taken from the board's own contract document and put in plain words.

The firmwareThe official UF2 for the Raspberry Pi Pico, MicroPython v1.29.0, pinned by its SHA-256 and booted through the RP2040’s boot ROM on our own Cortex-M0+ core at 125 MHz.
machinePin with interrupts, PWM on every GPIO pin, ADC on GP26 to GP28, I2C and SoftI2C, SPI and SoftSPI, with I2C and SPI on the RP2040’s own blocks and DMA.
Librariesmicropython-lib’s ssd1306.py draws on an SSD1306 OLED, and a BME280 driver reads the sensor, each as a tab of the project, as you would copy it onto a real Pico.
What is not thereThreads on the second core and machine.I2CTarget. A program that reaches for them stops rather than reading something made up. PIO runs, and on a Pico W the CYW43439 is modeled, so network.WLAN joins the simulated network.
Go further

The full board page

Every peripheral area, every example and the wiring notes, in one place.

Raspberry Pi Pico simulatorThe RP2040 in detail, every Pico example and the wiring notes.

Questions

Is this the real MicroPython?

Yes. It is the official firmware for the Raspberry Pi Pico, v1.29.0, the same file you would drag onto a real one, running instruction by instruction on a simulated RP2040. Nothing in the page interprets Python.

Which boards run MicroPython here?

The Raspberry Pi Pico and the Pico W (whose CYW43439 is modeled, so network.WLAN joins the simulated network), the ESP32-S3, ESP32-C3 and ESP32-C6 boards, and the classic ESP32 boards (the DevKit V1, the DevKitC and the LOLIN32 Lite), each on its official MicroPython v1.29.0 firmware.

How do I start?

Open one of the examples below, or put a Pico on the canvas and choose MicroPython (main.py) in its Firmware panel. Press Run: main.py is copied onto the board and runs, and print() shows in the Serial Monitor.

Is there a REPL?

Yes. When main.py ends, or after Ctrl-C, the Serial Monitor is the board’s REPL: type 6*7 and it says 42.

Can I use an OLED or other I2C parts?

Yes. machine.I2C drives the RP2040’s own I2C block, I2C.scan() finds the parts on the bus, and micropython-lib’s ssd1306.py draws on an SSD1306. A missing address raises OSError: [Errno 5] EIO, as on a desk.

Does it simulate PIO or the second core?

Not yet. rp2.PIO and rp2.StateMachine fault, and starting a thread on core 1 stops the board with a sentence saying it is not simulated.

Can I change the clock speed?

machine.freq(200_000_000) is accepted and reported, but the core keeps running at 125 MHz, so code does not get faster.

Is it free?

Yes, with no card and no account needed. The first Run downloads the firmware, 229 KB, and the browser keeps it for every later Run.

Try your own main.py on the Pico

Choose MicroPython (main.py) in the Pico’s Firmware panel and press Run. Nothing to install and no account needed.