d.tools: Arduino support (EXPERIMENTAL)

You will soon be able to use the Arduino hardware platform together with the d.tools software design environment. Arduino support is EXPERIMENTAL - things are still buggy and broken. The instructions below are just for the adventurous...

What do I need to do?
First, download and install the d.tools graphical editor plug-in for Eclipse - instructions here. (NOTE: We still need to do some troubleshooting of serial communication - chances are the current version of Eclipse will NOT be able to communicate with the Arduino board. This seems be be due to unreliable communication between the PC and the FTDI 232BL when using 115200, 8N1 communication. 115200 8E1 seems to work, as does any other scheme involving an extra parity bit or 8N2. But this has not been pushed through to the latest Eclipse plug-in release.)


Then download the following binary file for the Wiring board form this site: dtools4arduino-01.hex
(source on sf.net - you'll need a WinAVR and our own enhanced version of Pascal Stang's avrlib toolchain to compile this).

Next, program the file onto your Arduino board. We currently do this using AVR Studio and an Atmel STK500 programming board, NOT via a bootloader. (NOTE: Someone should test whether the code is small enough to be run on top of a bootloader - we're currently at 7154 bytes).

Make a note which virtual COM port your Arduino board appears as (look it up in the Device Manager in Windows) and enter that into the d.tools Preferences (Window menu->Preferences->d.tools Preferences).

Restart Eclipse.

What kind of inputs/outputs are available? And how do I use them?
In this early version, we support 6 discrete inputs, 6 analog inputs, 5 discrete outputs and 2 PWM channels. d.tools uses OpenSoundControl messages to address hardware - each input and output pin will have its own address (a string that looks like a file path). Here is the mapping of Wiring ports to OSC addresses:


(close-up: ports relabeled with OSC addresses)

How does this work?
The program running on your Arduino board communicates with d.tools via OpenSoundControl messages. Each time one of your inputs (discrete or analog) changes in value, the Arduino board sends an OSC message to the PC that describes the input change. The PC in return can send OSC messages back to Wiring. The messages are parsed and discrete or PWM outputs are set accordingly. In essence, you Arduino board is now a PC-controlled sensor data acquisition interface.

What about supporting Wiring?
We are also developing a port for the bigger Wiring board. It has its own page here.

What else can I do with my newly-flashed Arduino board?
Since data output is in OSC format, you could connect it directly to puredata (pd) to control sound synthesis. Most OSC-aware applications expect the OSC packets to arrive as UDP packets though (and not as data from a serial port), so you'll need some helper app (such as this one from Joel@CCRMA) that rebroadcasts serial OSC messages as UDP packets. Scott Wilson's dumpOSCSerial can read serial data in pd but it is only available for Linux and OSX at the moment.