How to use a gyro?

Newbie software mentor here.
Our team is using Java for the first time and we’d like to use a gyro. We’ve read through the control system and roboRIO documentation and can’t seem to find anything that describes (1) what to do with the hardware and (2) what to do with the software.

The roboRIO has an accelerometer however the documentationwas baffling.

Snippets of documentation we found were:
"Gyros typically in the FIRST kit of parts are provided by Analog Devices, and are actually angular rate sensors. "
and
“Note: The AnalogGyro class in WPILib uses a hardware (implemented in the FPGA) accumulator to perform the integration. This means Gyros are supported on a specific, limited, set of channels. On the roboRIO this is currently Analog Inputs 0 and 1 on the on-board headers.”

So does this mean we can install a gyro made by Analog Devices in Analog inputs 0 and 1 and the sample code could be used to determine the angle? If so, what are the supported devices we can install? We do have gyros from previous years.

Also, when the Note above refers to “the FPGA”, what FPGA are they talking about?

Many thanks.

The “FPGA” refers to the hardware on the roboRIO thats running the linux archetecture that we deploy code upon. When it says “The FPGA”, I assume its referring to the integration of the gyro… The gyro is a rate sensor, not a position sensor, so the integration is done on the FPGA (circuit-side) to get cycle times of >60hz (oh yes I am correct on this assumption as i actually read your post)

That tutorial on ScreenSteps should work fine, just follow it as it says.

Also, you don’t need to connect both ports if you’re looking to do something like turning 45 deg. On the KoP gyro, the port you want is closest to the edge and signal is facing inward

After that, just initialize it as it says in the screensteps

 myGyro = new AnalogGyro(port)

and to get the delta angle (angle since last reset),

myGyro.getAngle()

If you want to reset it, just call

myGyro.reset()

and getAngle() will return 0. If you turn 15 deg, getAngle will return 15deg. If you turn 30, it will return 30deg. etc.