Code:
nMotorEncoder[motorA] = 0;
wait1Msec(50);
nMotorEncoderTarget[motorA] = x; <- set this to the number of rotations the Motor Encoder needs to rotate
motor[motorA] = 100;
while ((nMotorRunState[leftMotor] != runStateIdle))
{
EndTimeSlice();
}
return;
This can only be used if you have a shaft encoder attached to the motor you want to use. Good luck.