void turnR(float deg){
InertialSensor.calibrate();
while (InertialSensor.isCalibrating()) {
wait(100, msec);
}
LFM.spin(forward);
LBM.spin(forward);
RFM.spin(forward);
RBM.spin(forward);
waitUntil((InertialSensor.rotation(degrees) >= deg));
LFM.stop(coast);
LBM.stop(coast);
RFM.stop(coast);
RBM.stop(coast);
}
This is my code for turning right, when i want to write turnR(90.0);
robot always turns and never stop. Could anyone help me?