WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

InvenSense/IDG500.h

The IDG500 is a 2 axis gyro that can measure rotations up to 500 degrees per second.
Data sheet: http://www.sparkfun.com/datasheets/Components/SMD/Datasheet_IDG500.pdf
Requires 2 ADC channels.
Note that the device requires a 3v supply.
The device operates in two modes:-
Note that this is not a 'software setting' and so this library cannot automatically choose the correct value. It actually depends on which pin on the device you use to connect to the ADC. The 'SLOW' option is referred to in the data sheet as the '4.5' output (coz its like the 'FAST' speed divided by 4.5).
To create the device use:-
IDG500 idg500 = MAKE_IDG500(ADC0, ADC1, slow);
Where slow is TRUE for the SLOW output, or FALSE for the FAST output.
Don't forget that you should initialise the device in appInitHardware:-
gyroInit(idg500);
You can read the device by using:
gyroRead(idg500);
and then the results are in:-
idg500.gyro.x_axis_degrees_per_second
idg500.gyro.y_axis_degrees_per_second

Valid XHTML 1.0 Transitional