|
Re: Autonomous with Ultrasonic sensor doesnt work!!
[/quote]
Quote:
Originally Posted by Chris Hibner
The portion of the code in the "while loop" will run continuously. The portion outside of the "while loop" will only run once (as soon as autonomous starts), and will never run again. Therefore, the code that is checking the ultrasonic sensor is never checked after the start of autonomous.
Remove the "while loop" around the motors, and place the wh[IMG]C:\Users\Developer\Desktop\autonomouss.png[/IMG]ile loop around all of your code. That should fix the problem.
|
We put all of our autonomous code inside the while loop however the robot still doesnt do what we want. We would be really happy if you could help us.
Thanks in advance.
Last edited by cilginbilgin : 01-02-2012 at 14:48.
|