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 :

  1. Install VSCode
  2. Ctrl Shift X
  3. Install the Wokwi Simulator extension
  4. Ctrl Shift P
  5. Wokwi: Request a New License
  6. Install the Wokwi license (free for trial period)
  7. Install the Arduino CLI
  8. Install the Arduino model (Arduino UNO in my case): arduino-cli.exe core install arduino:avr
  9. If needed, rename the .ino file (eg: sketch.ino ) to foldername.ino
  10. Install additional needed libraries. Eg for Servo : arduino-cli.exe lib install servo
  11. Compile the local project : arduino-cli.exe compile -e --fqbn arduino:avr:uno
  12. Compiling generates a build folder containing.
    • arduino.avr.uno
      • .ino.eep
      • .ino.elf
      • .ino.hex
      • .ino.with_bootloader.bin
      • .ino.with_bootloader.hex
  13. Create wokwi.toml file with the following content

    [wokwi]
    version=1
    firmware='build/arduino.avr.uno/<projectname>.ino.hex'
    
  14. firmware must have the local path to the .ino.hex file. Use forward slashes even for Windows.

  15. Open the local project in VSCode as a folder, if you haven't already

  16. Ctrl Shift P

  17. Wokwi: Start Simulator

  18. After each change to the .ino (C++ code), it's enough to recomplile.

  19. The simulator will reflect the changes, without being restarted.

Arduino circuit with Potentiometer controlling LED brightness