
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.
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. 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.
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.
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. 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