In your code, you have
Code:
while(true)// i also tried while(1 == 1)
{
motor[elbow] = -63;
wait1Msec(1500);
}
so you're on the right track. Both
while(true) and
while(1 == 1) will work (because
1 == 1 evaluates to
true so it's just a more indirect way of writing the same thing).
However, the block of code inside the
while(true) loop is the only thing that will run forever. So at the moment, your elbow motor will run forever, but not the rest of the code.
You should change your code so that the
while(true) { ... } surrounds the entirety of the code that you want to run forever.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor