Recently I had a need to do some Arduino simulations. At first, my thoughts went to Wokwi.com after a realization that I forgot my password and have recently started to prefer to work with offline tools I went on a quick search for offline Arduino simulators.
A quick google search later I found myself on SimulIDE website.
SimulIDE is a simple real time electronic circuit simulator, intended for hobbyist or students to learn and experiment with simple electronic circuits and microcontrollers, supporting PIC, AVR and Arduino.
To properly use the SimulIDE we will need also to install Arduino IDE 1.8x. And, if we use any libraries outside the standard ones we will need to install them using the Arduino IDE.
SimulIDE compiles the script to bytecode and stores it into a standard HEX file that we can later upload directly to the microcontroller.
The interface is a bit clunky and has a few quirks but in the end, starts to sound “logical”. But when compared to most modern IDEs that don’t rely that much on contextual popups SimulIDE does. I spent a couple of minutes searching how to display the Serial output window only to find it under left click on the image of Arduino itself. As SimulIDE is developed and maintained by a single developer, arcachofo, this nonstandard interface is not unusual as Im also guilty of “improving” already established patterns of UI design with my “better” version.
There are two components to the UI. For example, go to File explorer and in the top panel choose Examples then in the bottom one navigate to the Micro/Nano-Marduino_Game folder, and also open up the marduino subfolder. Notice two file types: the sim1 and ino. If you double-click on the sim1 it will open schematic and if you double-click on ino it will open source code in the right side editor. As I mentioned, UI is “logical” but not normal.
There is also a very useful real-time monitor, right click on the Arduino and select Open MCU Monitor. You’ll be able to check register contents in real time when the simulation is running.
SimulIDE is not just an Arduino simulator but also “features a code Editor and Debugger for GcBasic, Arduino, PIC asm and AVR asm” as well a standard circuit simulator”.
All in all, it’s a well-rounded simulator that does not need an internet connection to work which I think is a plus, and it can inspect registers in real time, another plus. The drawback is manageable with the biggest one being the User Interface, but If you need to check if some simple code will work without resorting to poking around the breadboard with the rat’s nest of wires just to check if a button will fire off an event then check out.