Arduino and Processing over Serial
Processing digitally generated data and bringing it to \"reality\" in a visual form is amazing.Thursday, December 11th, 2008
For those of you that don´t know it yet .Processing is an open-source enviroment that makes graphic design easy and totally intuitive for software programmers. Based on a easy-to-learn languaje very very similar to java ( also it can be intergrated with Eclipse or Netbeans) it provides the developer with a very well designed structure and methods that allows points, lines, shapes to be painted on a virtual canvas.
It fits perfect for those who want to give their developments a “pretty face” without having to learn something completely different as we are used to.
The goal of doing this is obvious, arduino allows us to play with sensors and design interfaces and prototypes over a small/cheap device , all those generated signals with this sweet tool can be shown by using leds, lcds, servos etc. But the flexibility to design whatever you want to present these data is worthless.
I wonder wich video-”techy”-artist does not use it.
Taking my Capacitive Bar Sensor , i’ve written some code to make all that input signals come to “reality” , the code ( found below ) reads from serial interface of the laptop ( usb ) a stream of bytes sent by Arduino, each byte represent the pressed position of the bar.
The processing code reads these bytes and makes the correspondent box react. Also, i tried to make these programm recognise some patterns, the possibilities are not too big, so these are the two input patterns detected:
Scroll Up / Down : All the sent bytes are stored in a buffer so we can check wheter they came in a sequential order or not [0][1][2][3][4][5] -> UP [5][4][3][2][1][0] -> DOWN
Scratch in the middle : if the central positions are “pressed” alternatively [2][3][2][3] -> MIDDLE
Arduino and Processing over Serial from Alejandro Corbi on Vimeo.
I though that adding sound could be a nice feature, so this implementation can act as a music-interface. It was sooo easy as importing Minim Sound Library to the enviroment and start playing around that i was fully surprised.
Thursday, December 11th, 2008