Thursday, February 08, 2007

Pure Data + Arduino



I worked on some software for the Arduino microcontroller to control the solenoids of the Deep Listening Device. The code accepts "note" inputs from the Pure Data patch that will do the "deep listening." The Arduino code converts the note input to the proper signals to operate the solenoid attached to the desired accordion valve.

The code sends a 48-bit sequence out to the shift register circuit I built previously. Each bit controls a single solenoid, turning it on or off.

I used code snippets for the shift register from http://www.arduino.cc/en/Tutorial/ShiftOut. The communication to Pure Data uses the Simple Message System library from http://tof.danslchamp.org/SimpleMessageSystem.

Here is the code:
Deep Listening Device Arduino Code

Here is a video of the startup sequence of the circuit. LED's are attached to each output for troubleshooting and show which solenoids are being activated.

No comments: