help with aparallax ultrasonic distance sensor on arduino
I just got my parallax ultrasonic distance sensor (#28015) and I have the "test code" running as I type, but how do I use it to warn my robot of walls?
P.S I am using an Arduino diecimila.
I just got my parallax ultrasonic distance sensor (#28015) and I have the "test code" running as I type, but how do I use it to warn my robot of walls?
P.S I am using an Arduino diecimila.
@ Wed, 2008-11-05 23:51
ping sensor
@ Fri, 2008-11-07 03:57
yea
thanks
~Matt
@ Tue, 2008-11-04 07:55
Pseudocode
DOn't know Arduino, but somethiing like :
if (ultrasoundValue < presetDistance ) then GoTheOtherDirection
might be a start.
Just relate what distance to an objact you feel is safe for the robot to get within, then use that value to change what the robot is doing. You mihgt have code that sets the robot going forward initially, andin its travels, the distance measured to obstacles starts getting smaller. So you would have a set value to trigger the robot to either turn away, or even back away from the detected whatever.
@ Wed, 2008-11-05 22:43
ohh I see
for some reason it sounded impossiblly hard to figure out in my head lol
thanks
~Matt
@ Fri, 2008-11-07 05:23
my roverbot has basic code
my roverbot has basic code for using a parallax ping sensor to navigate and avoid obstacles
http://letsmakerobots.com/node/2744
code is available there for download
:-)
@ Sat, 2008-11-08 06:12
wow
thanks thats just what I was looking for
~Matt