Let’s say I’ve got the following the code:
Code: Select all
RotateMotor(OUT_A, 30, 360);
RotateMotor(OUT_B, 40, 180);
If the above is correct, what would happen if:
Code: Select all
RotateMotor(OUT_A, 30, 360);
Off(OUT_A);
What is the best way to ensure that Motor A finishes its turn? I have tried inserting a Wait command after starting Motor A but results seem rather inconsistent.
Would this work?
Code: Select all
while(MotorRunState(OUT_A)!= OUT_RUNSTATE_IDLE)
{
}