|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#3
|
|||
|
|||
|
Re: gyro c++ Programing
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
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|