in the gyro example they use this
Code:
gyro.Reset();
while (IsAutonomous())
{
float angle = gyro.GetAngle(); // current heading (0 = target)
myRobot.Drive(-1.0, -angle / 30.0); // proportionally drive in a straight line
Wait(0.004);
}
myRobot.Drive(0.0, 0.0); // stop robot
how do we make the robot turn lets say 45 degrees then drive for 3 seconds