|
Re: Noob question for teleop
Quote:
Originally Posted by CjDace
|
For that gyro, you are connected to the correct port (the onboard SPI port). To construct a gyro object in code, you will want to use the Java class that was built specifically for this gyro:
http://first.wpi.edu/FRC/roborio/rel...S450_Gyro.html
You should be able to use the default (no parameter) constructor.
gyro = new ADXRS450_Gyro();
Now, in your drive code's call to the mecanum_Cartesian() method, you should be able to use gyro.getAngle().
Keep asking if it ain't working.
__________________
2014 Las Vegas (Winners with 987, 2478; Excellence in Engineering)
2014 San Diego (Finalists with 987, 3250; Quality Award)
2013 Inland Empire (Winners with 1538, 968; Excellence in Engineering Award)
2013 San Diego (Finalists with 2984, 4322; Creativity Award)
2012 Las Vegas (Finalists with 2034, 3187; Quality Award)
|