|
Driving based on range?
Hello -
I've written a quick snippet for Autonomous which should drive the robot at 0.65 until the rangefinder reads somewhere less than a given number. In this example, I've entered an arbitrary value of 60.
I've placed the drive within a loop, running every 20ms. Once the rangefinder reads a value less than 60, it is set to stop the While loop.
My question is do I need to feed the motors a value of 0 after the While loop is stopped, or don't I? See the attached image.
Thanks, Dom
Last edited by DominickC : 03-03-2012 at 15:01.
|