|
Re: Driving Straight
When WPILib 2017 is released, take a look at the gyro example. It is a sample program to demonstrate how to use a gyro sensor to make a robot drive straight. The program uses a joystick to drive forwards and backwards while the gyro is used for direction keeping. You can replace the joystick in the example with the output from a PIDController to drive straight for a certain distance.
You can get to the Gyro example by:
File -> New -> Other -> WPILib Robot Java Development -> Example Robot Java Project -> Gyro
__________________
|