
Machines
The chip on screen is simulated, the firmware running on it is real
Wokwi simulates an ESP32 or Arduino in the browser by running the actual compiled firmware against a software model of the chip, not a rough approximation of it.
On the left, a code editor with a few lines of Arduino. On the right, a drawing of an ESP32 board, every pin labeled. Press the green play button and the board runs your code, blinks its pins, prints to a serial monitor, even talks to simulated Wi-Fi.
Wokwi, started by Uri Shaked, is an electronics simulator that does something most simulators do not: it runs the real firmware. When you compile a sketch for an ESP32 here, the exact binary you would flash onto a physical chip is what executes, against a software model of that chip's processor and peripherals.
Here is why that distinction matters. A lot of simulators fake the behavior at a high level, close enough to look right. Wokwi models the instruction set itself, and it is not QEMU under the hood but a family of purpose-built cores. The demand for exactly this is measurable: the ESP32 starter page alone counts nearly nine hundred thousand saved projects. I reloaded it while writing this update and the counter read 897,686, so the rounding will not hold much longer.
The board menu has quietly become a catalog of the whole ESP32 dynasty while nobody was watching: the original chip, then the S2, S3, C3, C6 and H2 variants, plus third-party boards like the M5Stack Core S3 and the Seeed XIAO line, each with its own starter template. Pick one, press play, and the right simulated silicon wakes up.
The open half: a chip written in TypeScript
The Arduino engine is readable end to end. AVR8js, Shaked's MIT-licensed AVR core, is TypeScript: a CPU class holding the registers, the program counter and a cycle counter, plus the AVR instruction set implemented one instruction at a time straight out of the manual. That is what cycle-accurate means in practice. The simulated chip spends clock cycles where the datasheet says the silicon would, so timing code behaves. The repo sits at 846 stars, and the README's example list is the quiet proof of usefulness: community Electron playgrounds and school robotics labs run on the same core, feeding it the same compiled binaries.
The library's scope is honest about where the magic stops. It implements the CPU and the on-chip peripherals, PWM and serial and EEPROM and even the tight timing WS2812 LED strips demand, and leaves the glue to you: your code wires a register write to a picture of an LED. The core targets the ATmega328p in the Uno first, with the modular design stretching to the ATmega2560 and ATtiny85. Shaked's writeup on building it goes down to the hook mechanism that lets a virtual LED react to a register write, and to the small cloud service running Arduino CLI that turns your sketch into the AVR binary the loop consumes.
The hard half: a chip nobody documented
The ESP32 side covers both the Xtensa and RISC-V variants of the chip, and its Wi-Fi hardware has no public datasheet. So Shaked reverse engineered it: run real Wi-Fi firmware in the simulator, let it crash, read the crash in GDB, disassemble the surrounding code in Ghidra, add whatever memory-mapped register the firmware was reaching for, and repeat. He told the whole story at Remoticon 2021, by which point the simulated radio was faithful enough that stock MQTT libraries ran identically on fake and physical chips.
That talk is my favorite kind of engineering story, because the method is so blunt. There was no datasheet to read, so the firmware itself became the datasheet: every crash was the radio hardware asking for a register that did not exist yet, and the simulator grew one register at a time until the crashes stopped.
Think about what that buys a classroom, too. An ESP32 dev board is cheap, but a lab of thirty of them plus wiring, sensors and the one kid who bridges 5 volts into the wrong pin is not. Here the whole bench is a URL, the parts bin is infinite, and the worst possible accident is a browser tab you close.
The practical magic is that a timing bug in your interrupt handler shows up here, before you have soldered anything, because the cycles are counted for real. You can attach GDB and single-step the firmware, or capture the I2C chatter on the built-in logic analyzer.
The cores keep multiplying
The AVR and the ESP32 are not the whole shelf. rp2040js is Shaked's emulator for the chip inside the Raspberry Pi Pico: 528 stars, TypeScript again, MIT again, and complete enough to boot MicroPython and CircuitPython with a working REPL and a simulated flash filesystem underneath, LittleFS for one and FAT12 for the other. GDB attaches to it too, which produces a sentence I enjoy typing: you can single-step Python running on a Pico that does not exist.
The pattern holds across the whole family. Model the silicon faithfully, then let unmodified firmware discover that nothing is wrong.
The acid test for that faithfulness is the WS2812 LED strip, which avr8js drives correctly. Those strips read a 0 or a 1 from pulse widths a few hundred nanoseconds apart on a single wire, so a simulator that fudges its cycle counting paints the wrong colors immediately. When the fake chip lights the fake strip in the right pattern, the clock is telling the truth.
Where the same trick runs at industrial scale
If you want to see what this approach becomes when companies bet products on it, Renode is Antmicro's open source system emulator: more than 1,200 supported boards, over 12 CPU architectures and 800-plus peripheral models, used to test firmware in CI pipelines before the real silicon ships. The validation loop is continuous: Renode's CI boots Zephyr and U-Boot images across its board catalog to prove the models still tell the truth, and the partner list, Silicon Labs, Google, Microchip, Analog Devices, says serious money already trusts the answers. Same idea as the toy in your tab, grown up to multi-node systems.
Wokwi is the on-ramp and Renode is the freeway, and the firmware cannot tell either one from the road.
It is the same species of trick as the Debian that boots in a tab: the software is real, and the hardware is a story told carefully enough that the software never checks out of it.
Starting costs nothing: docs.wokwi.com walks you from a blinking Uno to an ESP32 fetching real weather over fake Wi-Fi. If simulating a processor makes you want to understand one from the gates up, there is a game that builds a working CPU starting from a single NAND gate. More electronics running with nothing plugged in: a circuit that re-solves itself every few microseconds.

Next up
Paint a low-poly planet into being, one tile at a time