Wokwi is a platform that helps you design and run Ardunio in the cloud (free for Open Source projects).
To run it locally, the following steps can be used :
- Install VSCode
Ctrl Shift X- Install the Wokwi Simulator extension
Ctrl Shift PWokwi: Request a New License- Install the Wokwi license (free for trial period)
- Install the Arduino CLI
- Install the Arduino model (Arduino UNO in my case):
arduino-cli.exe core install arduino:avr - If needed, rename the .ino file (eg: sketch.ino ) to
foldername.ino - Install additional needed libraries. Eg for Servo :
arduino-cli.exe lib install servo - Compile the local project :
arduino-cli.exe compile -e --fqbn arduino:avr:uno - Compiling generates a build folder containing.
- arduino.avr.uno
- .ino.eep
- .ino.elf
- .ino.hex
- .ino.with_bootloader.bin
- .ino.with_bootloader.hex
- arduino.avr.uno
-
Create wokwi.toml file with the following content
[wokwi] version=1 firmware='build/arduino.avr.uno/<projectname>.ino.hex' firmwaremust have the local path to the.ino.hexfile. Use forward slashes even for Windows.Open the local project in VSCode as a folder, if you haven't already
Ctrl Shift PWokwi: Start SimulatorAfter each change to the .ino (C++ code), it's enough to recomplile.
The simulator will reflect the changes, without being restarted.
Top comments (1)
Two things that bit me after following a walkthrough exactly like this one. The filename rule β the .ino has to match its parent folder β is the one everyone hits, because VSCode is happy and the compile is not, and the error never points at the folder name. And forward slashes in wokwi.toml even on Windows: backslashes parse and then resolve to nothing.
What I would add for the next reader: build to a fixed output directory instead of whatever arduino-cli prints under build/. My first setup pointed firmware at a path that still existed from the previous run, so the simulator kept running the old hex and every recompile looked like it had no effect. The recompile-and-reload loop is otherwise genuinely the part that makes this worth setting up locally.