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.

  • 505parts on the bench
  • 45boards 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.
How it works

Three steps from a blank tab to a running circuit.

  1. Open the editor

    It runs in your browser tab. Nothing to install, and you need no account to start.

    Your first project
  2. Wire it and write the code

    Drag parts onto a breadboard, run each wire from pin to pin, and write the sketch beside it.

    Wiring
  3. Press Run

    Your sketch compiles in the tab and runs on a model of the chip, with the Serial Monitor beside it.

    Run and serial
Reviews

What makers say about Mokxi.

“The AI checker helps check and correct my circuits, and it has way more components than Tinkercad. As a student I really appreciate the tool.”

ChloeEngineering student

“I’d been looking for a real online electronic simulator that was intuitive and complete when I found Mokxi. I was able to quickly import a Fritzing file and my Arduino sketch and start testing. Mokxi has all of the makings for the best online Arduino simulator I have been able to find!”

JayModel builderFeatured in his DioramaOS post

“I’m using Mokxi to develop and simulate an STM32-based four-wheel-drive robot car before building the actual hardware. It allows me to experiment with DC motor control, PWM, RPM measurement using photointerrupters, and different acceleration, braking, and reversing strategies, helping me understand and refine the system before implementing it in real life.”

NusretRobot car builder, Hamburg

Share your story

FAQ

Questions, answered.

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.

Simulators for one kind of circuit

A servo, a display, a motor driver or a rectifier, each already running.

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.