Week 1: Arduino programming without an Arduino

If you want to learn Arduino programming, but don’t always have access to a box of physical hardware, there are a number of Arduino Simulators available, however one of the best ones I have found to use, is also free.

UnoArduSim

Arduino is a great platform, but If you’re trying to debug a program with a mix of software bugs and hardware issues, you could use a free helping hand! UnoArduSim.exe allows you to do a real-time test of most Arduino programs (for Uno) without needing any actual hardware. Supported libraries are (all for the Arduino V1.6.6 release):

  • SD.h,
  • Stepper.h,
  • Servo.h,
  • SoftwareSerial.h,
  • Wire.h,
  • SPI.h,
  • EEPROM.h.

UnoArduSim provides a virtual target Uno board and allows the user to choose, and interface to, one or more of several types of virtual input/output devices. These include typical hobbyist DC gear-motor, stepper-motor, and servo motors, generic serial devices with selectable baud rate, generic I2C and SPI slaves, an SD card with SPI interface, digital and analogue waveform generators, piezo speakers, LED’s. push-buttons, resistive pull-ups and pull-downs, and a slider potentiometer. All devices are electrically (and mechanically) modelled.

You can load and edit (and correct) your Arduino program, then run, run-to, halt, step-into, step-over, and step-out-of while watching all accessible program variables and monitoring pin levels (and even pin waveforms). Simple and clear parse and execution error messages are provided.

UnoArduSim is a free educational tool for everyone to use. — Stan Simmons Ontario

You can Download it from the official website (or the copy I have mirrored (PDF Instructions)). annoyingly it is windows only; and I am a Mac user.

Grab the zip file, unzip it and run the EXE file šŸ™‚

Now you have this you can try running basic Arduino code:

I was running it in Windows 7 in Virtual Box on my mac, and it suffered some performance issues.

iCircuit

Another option is iCircuit, which is available for macOS, iOS and Windows 8 (Other versions of windows may work). I use it on both the iPad and the Mac, unlike UnoArduSim this is a Circuit simulator, and allows you to design circuits, and simulate them in real time.

The circuit I am using is (download Arduino.icircuit):

Arduino Blink on Mac with iCircuit
Arduino Blink on Mac with iCircuit

As you can see iCircuit does not support the full Arduino command set; however this may change.

iCircuit is a great app, and it has some limitations, one of those limitations relates to sub circuits being black boxes with no feedback:

Fritzing

Fritzing is not a simulator of any kind, its a bit of software for making easy to look at images, this is the iCircuit schematic redrawn in Fritzing:

As I draw circuits out and talk about programming I suspect I will use a mixture of these three applications to illustrate my posts.

Leave a Reply

One thought on “Week 1: Arduino programming without an Arduino”

%d bloggers like this: