Programming the PING sensor help
Ronzem
Posts: 1
Where are 3 friends that bought a Boebot and the ping sensor for it, Our plan was that the boebot should run forward until the ping sensor detects an object within 10 cm, and then it should turn around 90 degrees and then run forward again, until it get's 10 cm close to an object, and then turns around....
We been working on this for some weeks now but we can't get it to work, How do we do this? what's the code to use.
We want something like this:
Ping sensor detects the object and shows that it's 00010cm away from it
so...
IF Distance 00010 THEN
Pulsout 13, 750 (for the wheels to move)
something like that...Can anyone help us program the ping sensor to do this?
Thanks.
We been working on this for some weeks now but we can't get it to work, How do we do this? what's the code to use.
We want something like this:
Ping sensor detects the object and shows that it's 00010cm away from it
so...
IF Distance 00010 THEN
Pulsout 13, 750 (for the wheels to move)
something like that...Can anyone help us program the ping sensor to do this?
Thanks.
Comments
http://forums.parallax.com/forums/default.aspx?f=6&m=98784
Note: If you don't have a standard servo to sweep the Ping))) back and forth, just modify the example code to make the Boe-Bot turn back and forth instead.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen