There are a couple of ways you could determine how many rotations of the wheel is needed:
Let's take a look at a working example. If the distance between the two wheels on your robot is 117 millimeters, we can then multiply that number by PI (3.14159) to get the number of millimeters the tires will travel on the ground to get the robot to make a complete circle: 368 millimeters. If each tire itself has a diameter of 56 millimeters, then we know that each tire will travel (56 x 3.14) 176 millimeters when the tire makes one complete rotation on its axle. Therefore, it will take (368/176) 2.1 rotations of each axle to make the robot make 1 complete turn.
If we only want the robot to turn 90 degrees (1/4th of a complete turn), we would need to rotate each wheel only 1/4th of 2.1 which is 0.52 rotations. We can then tell the robot to turn each wheel 0.52 rotations (in opposite directions) to get the robot to make a 90 degree turn.
Using the Move block in this way to make a point turn is very simple and is often used by students who are just learning about robotics. If you are competing in FLL tournaments and wish to show your skills in programming, you may want to try using MyBlocks to allow you to more quickly develop programs and harness the power of the programming language.
In this example, the MyBlock created has two input values: power level and degrees. The degrees entered here would be the degrees that you want the robot to turn. The MyBlock will multiple the input degrees by a "constant" (in this example the constant is 4.1) to determine how many degrees to rotate each wheel axle. Notice how the arrow on the B-Motor block is point down while the arrow on the C-Motor block is point up. This means that the two motors will move in opposite directions.
void TurnRight(int turnDegrees, int power, bool KeepGoing) { float targetDegrees = (2 * centerOfWheelToCenterOfRobotMM * PI) / wheelCircumference * gearRatio * turnDegrees; targetDegrees = targetDegrees + nMotorEncoder[motorB]; nSyncedMotors = synchBC; //motor B is the master, motor C is the slave if(KeepGoing) { bFloatDuringInactiveMotorPWM = true; // coast or float } else { bFloatDuringInactiveMotorPWM = false; // brake nMotorEncoderTarget[motorB] = targetDegrees; // sets a target } nSyncedTurnRatio = -100; //motors move in opposite directions of one another motor[motorB] = power; //turns the motor on at specified power while(nMotorRunState[motorB] != runStateIdle && nMotorRunState[motorB] != runStateHoldPosition && nMotorEncoder[motorB] <= targetDegrees) { //continue to power motorB until the motor nMotorEncoderTarget position is reached } if(!KeepGoing) motor[motorB] = 0; // turn the motor off. bFloatDuringInactiveMotorPWM = false; // brake }In RobotC you can synchronize the two wheels even if you want them to move in opposite directions. Just set the Turn Ratio value to -100 as in: