Overview

Driver for an STMicroelectronics L3GD20 3-axis gyroscope.

Resources

All correct at time of writing, but as always, manufacturers love to move things around on their website.

Web page

http://www.st.com/web/catalog/sense_power/FM89/SC1288/PF252443

Datasheet

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00036465.pdf

Test hardware

This code has been tested using an Olimex MOD-L3GD20:

https://www.olimex.com/Products/Modules/Sensors/MOD-L3GD20/

This was wired to a CoreProto and plugged into a SenseCore:

http://soldercore.com/products/sensecore/

And finally installed on a SolderCore:

http://soldercore.com/products/soldercore/

Specification
Parameter Supported settings
Bandwidth (Hz) 95, 190, 380, 760
Range (dps) 250, 500, 2000
Communication up to 400 kHz (I2C) and 10 MHz (SPI)

API Summary

Macros
L3GD20_I2C_ADDR L3GD20 8-bit I2C address selected with SDO signal
Functions
l3gd20_initialize_i2c Initialize sensor on I2C bus