Datasheet

Python & CircuitPython
It's easy to use the L3GD20 sensor with Python or CircuitPython and the Adafruit CircuitPython
L3GD20 (https://adafru.it/CSq) module. This module allows you to easily write Python code that reads the angular
momentum from the sensor.
You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python
thanks to Adafruit_Blinka, our CircuitPython-for-Python compatibility library (https://adafru.it/BSN).
CircuitPython Microcontroller Wiring
First wire up a L3GD20 to your board exactly as shown on the previous pages for Arduino. You can use either I2C or
SPI wiring, although it's recommended to use I2C for simplicity. Here's an example of wiring a Feather M0 to the sensor
with I2C:
Board 3V to sensor Vin
Board GND to sensor GND
Board SCL to sensor SCL
Board SDA to sensor SDA
And an example of a Feather M0 wired with hardware SPI:
Board 3V to sensor Vin
Board GND to sensor GND
Board SCK to sensor SCL
Board MOSI to sensor SDA
Board MISO to sensor SA0
Board D5 to sensor CS (or use any other free
digital I/O pin)
Python Computer Wiring
Since there's
dozens
of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms,
please visit the guide for CircuitPython on Linux to see whether your platform is supported (https://adafru.it/BSN).
Here's the Raspberry Pi wired with I2C:
© Adafruit Industries https://learn.adafruit.com/adafruit-triple-axis-gyro-breakout Page 11 of 18