View Single Post
  #1   Spotlight this post!  
Unread 01-02-2012, 14:41
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Re: Autonomous with Ultrasonic sensor doesnt work!!

[/quote]
Quote:
Originally Posted by Chris Hibner View Post
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.
Reply With Quote