You are on page 1of 1

task main()

{
while(1){
resetMotorEncoder(motorB);
while(getMotorEncoder(motorB) <2000)
{
motor[motorB] = 75;
motor[motorC] = 75;
}
motor[motorB] = 0;
motor[motorC] = 0;
wait1Msec(100);

resetMotorEncoder(motorB);
while(getMotorEncoder(motorB) < 165)
{
motor[motorB] = 50;
motor[motorC] = -50;
}
motor[motorB] = 0;
motor[motorC] = 0;
wait1Msec(100);

}
}

You might also like