arduino command line setup

My friends and I are using the new ARM-based Arduino Due for our sphere project. To use the Due, you have to run v1.5.2 of the Arduino software. This version also comes with some new command line support which seems to work well.. although it opens up a GUI and that's annoying (asking around for a fix).

In the past I've used ino, and that was nice, but the current official release of ino doesn't support Arduino v1.5.2. This fork almost works for me, just had a small problem using it with the Leonardo. Might also try this idea for something ino-esque.

The very first step to getting Arduino 1.5.2 working on Ubuntu 12.10 was to just test the Arduino IDE. I had the "greyed out serial port" problem. This was solved by adding my username to the dialout group via: sudo adduser matt dialout. Then I had to restart my machine (just logging in to a new terminal session wasn't working..).

Then I could compile and upload from the command line like so:

$ arduino --verify /path/to/sketch
$ arduino --upload /path/to/sketch

This uses the last-used values for the serial port and board. Check the docs for more switches.


Got Arduino 1.5.2 and ino working with the fork from rogue-hack-lab. Well, I had to add one more tweak to make the Leonardo happy.

Then, like it says in the ino quickstart, I created a config file, ~/.inorc, with just one line:

board-model = leonardo

and now I can build and upload from the command line:

$ ino clean && ino build
$ ino upload