Archive for the 'Range Sensor' Category

PING range sensor setup

I was recently asked for some help from someone having problems using 2 PING Ultrasonic range sensors. I promised to send some pictures of the setup as I hadn’t provided information on this in my previous post. So just in case anyone else is having problems, here they are. Hope they can help.

PING range sensor setup

Arduino > Flash range sensor experiment

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.

Click here to see the video on Vimeo
Click here to see the video on YouTube

For this project I used a modified version of David Cuartielles’ Arduino sketch and SerProxy as a Serial-to-Network Proxy Server. Here is my serproxy.cfg code.

# 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.


  • RT @ShaunKing: URGENT. My friends in Standing Rock just sent this to me & asked me to share it. They are surrounded by militarized police… - 3 days ago
  • My wife visited a website on Friday. Today a brochure from the company arrived in the post. She didn't create an account. Is that a thing? - 2 weeks ago
  • "Yesterday I was clever, so I wanted to change the world. Today I am wise, so I am changing myself." Rumi - 3 weeks ago
  • Most interesting chart I've seen in a while.… - 3 weeks ago
  • Getting bored of saying (and hearing) his name. From now on I will refer to him as bubba. Seems like an appropriate sound. - 3 weeks ago

Flickr Photos




More Photos