adafruit_fxos8700

CircuitPython module for the NXP FXOS8700 accelerometer and magnetometer. Based on the driver from:

See examples/simpletest.py for a demo of the usage.

  • Author(s): Tony DiCola
class adafruit_fxos8700.FXOS8700(i2c, address=<sphinx.ext.autodoc._MockObject object>, 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!