Input Devices
Working fine / First try
Finally I used a piezo devices as an input.
I attached it to a board because I wanted to do a scratch sensor.
I just needed to add a resistor for more safety and connect it to the 'cosmino' board i've made.
Then I needed that arduino talk with processing. I did that using the serial communication, by just reading the value at the first time.
The next step was to use that variable in the processing sketch I already made. I modified it so the sorting pixels are like dust we can clean by caressing the sensor board, and when you stop doing that, dust came again.
Caresses sensor - FabAcademy Input Device from hugo moissinac on Vimeo.
Unfortunately I deleted the last processing sketch I made and the arduino code as well. This is a previous version, and the final result is just adding an arduino who read the piezo (analog read example) and send it (serial communication example). Then you need to scale the "varA" in the processing sketch with the reading value from the serial (wich mean from the piezo).