I’ve been playing around with the Arduino electronics prototyping platform recently and this is my first experiment. It’s a prototype for a future artwork that essentially acts as a primitive touchscreen device. I’ve used 2 PING))) Ultrasonic Range Sensors positioned at the top of my monitor. These measure the distance of any object placed in front of them. The Arduino board collects this data and passes it on to Flash via SerProxy.
# Config file for serproxy
# See serproxy's README file for documentation
# Transform newlines coming from the serial port into nils
# true (e.g. if using Flash) or false
# Comm ports used
# Default settings
# Idle time out in seconds
# Port 3 settings (ttyS2)
I spent quite a lot of time trying to use Firmata, and AS3Glue but found that Firmata didn’t work with the PING Range Sensor. I’m fairly sure that AS3Glue requires the Board to be running Firmata so, as mentioned above, I settled for Arduino code from David Cuartielles. I wrote my own Actionscript to deal with the incoming data using the Socket and ByteArray classes. You can find an early rough version of this code here.
Images of the setup can now be seen here.