The LY530AL is a single axis gyro that can measure yaw rotations up to 1200 degrees per second.
Data sheet: http://www.sparkfun.com/datasheets/Sensors/IMU/LY530ALH.pdf
Requires 1 ADC channels.
Note that the device requires a 3.3v supply.
The device operates in two modes:-
- FAST - can measure faster rotation speeds, up to 1200 degrees per second, but with less accuracy, or
- SLOW - can measure rotation speeds up to 300 degrees per second with greater accuracy.
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:-
LY530ALH yaw = MAKE_LY530ALH(ADC0,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:-
You can read the device by using:
and then the results are in:-