My partner wrote this program for the line tracks on our robot. It doesn’t move not a single inch. any clues?
task autonomous()
{
int threshold = 1330 ;
SensorValue[LeftEncoder] = 0 ;
SensorValue[RightEncoder] = 0 ;
while(SensorValue[LeftEncoder] < 500)
{
motor[LeftDrive] = 63;
motor[RightDrive] = 63;
motor[LeftIntake] = 127;
}
while(SensorValue[LeftLine] < threshold)
{
motor[LeftDrive] = 100;
motor[RightDrive] = 127;
}
while(SensorValue[LeftEncoder] > 15000)
{
if(SensorValue[LeftLine] && SensorValue[RightLine] > threshold)
{
motor[LeftDrive] = 127;
motor[RightDrive] = 127;
}
if(SensorValue[LeftLine] < threshold)
{
motor[LeftDrive] = 100;
motor[RightDrive] = 127;
}
if(SensorValue[RightLine] < threshold)
{
motor[LeftDrive] = 127;
motor[RightDrive] = 100;
}
if(SensorValue[RightLine] && SensorValue[LeftLine] < threshold)
{
motor[LeftDrive] = 127 ;
motor[RightDrive] = 127 ;
}
}
}