I plugged the sonar module into the top of the breadboard, wired ground, wired +5V, and then connected a wire from the signal port to the Arduino's pin 8. 15 minutes later, here's a video of me moving the sensor towards and away from my laptop's monitor:
After I wrote my own code, I found a slightly more elegant way to wait and count the length of the return pulse - there's Open Source community in action - thanks!
Anyway, here's my code - I've uploaded it to Liquidware.
3 comments:
Hey thanks, I picked up a PING))) sensor at Radio Shack today and your function works great!
What shield have you used?
Is it a breadboard shield? It seems very compact...
@rodrigo - this one: http://www.liquidware.com/shop/show/MPB/Mini+ProtoBoard :-)
Post a Comment