|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I have a problem with my autonomous code. It involves the use of a lot of while() loops that the compiler says will not end. I heard you might have to put an extra condition in the loop such as "If the motor is not on..."(In code). Here's my code:
while (rightteeth < 4 || leftteeth < 4)/*if robot has not turned four gear tooth counts... */ { pwm13 = 0; /*rev left motor */ pwm15 = 255; /*forward right motor, hopefully will turn robot about ten deg's */ } The variables rightteeth and leftteeth are to count inputs from the hall effect sensors. Please someone help me! |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2-week FIRST summer program @ WPI | ColleenShaver | General Forum | 20 | 31-05-2009 03:02 |
| Mulit-postioning with pnuematics this year? | KenWittlief | Pneumatics | 101 | 01-02-2005 21:54 |
| how to add steps in the provided encoder program for the edu | Zaramel2002 | Programming | 3 | 11-02-2004 08:35 |
| Fried program slots? | Jeff Waegelin | Programming | 18 | 19-03-2003 18:08 |
| Ahh! Program trick confusing! | archiver | 2001 | 9 | 24-06-2002 02:26 |