adafruit_fxos8700
¶
CircuitPython module for the NXP FXOS8700 accelerometer and magnetometer. Based on the driver from: https://github.com/adafruit/Adafruit_FXOS8700
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 (2.2.0+) for the ESP8622 and M0-based boards: https://github.com/adafruit/circuitpython/releases
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
-
class
adafruit_fxos8700.
FXOS8700
(i2c, address=31, accel_range=0)[source]¶ Driver for the NXP FXOS8700 accelerometer and magnetometer.
-
accelerometer
¶ Read the acceleration from the accelerometer and return its X, Y, Z axis values as a 3-tuple in m/s^2.
-
magnetometer
¶ Read the magnetometer values and return its X, Y, Z axis values as a 3-tuple in uTeslas.
-
read_raw_accel_mag
()[source]¶ Read the raw accelerometer and magnetometer readings. Returns a 2-tuple of 3-tuples:
- Accelerometer X, Y, Z axis 14-bit signed raw values
- Magnetometer X, Y, Z axis 16-bit signed raw values
If you want the acceleration or magnetometer values in friendly units consider using the accelerometer and magnetometer properties!
-