adafruit_fxas21002c
¶
CircuitPython module for the NXP FXAS21002C gyroscope. Based on the driver from: https://github.com/adafruit/Adafruit_FXAS21002C
See examples/simpletest.py for a demo of the usage.
- Author(s): Tony DiCola
Implementation Notes¶
Hardware:
- Adafruit Precision NXP 9-DOF Breakout Board - FXOS8700 + FXAS21002 (Product ID: 3463)
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
-
class
adafruit_fxas21002c.
FXAS21002C
(i2c, address=33, gyro_range=250)[source]¶ Driver for the NXP FXAS21002C gyroscope.
Parameters: Quickstart: Importing and using the device
Here is an example of using the
FXAS21002C
class. First you will need to import the libraries to use the sensorimport board import adafruit_fxas21002c
Once this is done you can define your
board.I2C
object and define your sensor objecti2c = board.I2C() # uses board.SCL and board.SDA sensor = adafruit_fxas21002c.FXAS21002C(i2c)
Now you have access to the
gyroscope
attributegyro_x, gyro_y, gyro_z = sensor.gyroscope
-
gyroscope
¶ Read the gyroscope value and return its X, Y, Z axis values as a 3-tuple in radians/second.
-