This programs wraps up the Arduino IDE and allows invoking the compile and deploy functionality from the command line. It is being used in the vim-arduino plugin. There are some major hacks in here b/c the IDE isn't really written to be invoked like this. Many of the utility classes attempt to load swing components. Ultimately things could be improved by refactoring and contributing to Arduino itself.
This project uses maven. To a full build you can run:
mvn clean install
java \ -Djava.library.path=/Applications/Arduino.app/Contents/Resources/Java \ -d32 \ -Darduino.sketchbook=<sketchbook> \ -Djava.awt.headless=true \ -jar vim-arduino-cli.jar (-c|-d) <pde_file> <port> <board>
sketchbook : Location of your Arduino sketchbook (used for finding custom libraries).
-c : Compile the sketch.
-d : Compile and deploy the sketch.
pde_file : the *.pde arduino sketch.
port : the comm port to talk to the board over (
ls /dev/tty.\* to
board : one of the boards defined in boards.txt (part of the Arduino install)
You must have the Arduino IDE installed. Currently only Version 0022 is supported.