A CircuitPython driver for the ADXL37x family of accelerometers

  • Author(s): Kattni Rembor

Implementation Notes


Software and Dependencies:

class adafruit_adxl37x.ADXL375(i2c: busio.I2C, address: Optional[int] = None)

Driver for the ADXL375 accelerometer

  • i2c (I2C) – The I2C bus the ADXL375 is connected to.

  • address (int) – The I2C device address for the sensor. Default is 0x53.

Quickstart: Importing and using the device

Here is an example of using the ADXL375 class. First you will need to import the libraries to use the sensor.

import board
import adafruit_adxl37x

Once this is done you can define your board.I2C object and define your sensor object. If using the STEMMA QT connector built into your microcontroller, use board.STEMMA_I2C().

i2c = board.I2C()  # uses board.SCL and board.SDA
accelerometer = adafruit_adxl37x.ADXL375(i2c)

Now you have access to the acceleration attribute.

acceleration = accelerometer.acceleration
property acceleration: Tuple[int, int, int]

The x, y, z acceleration values returned in a 3-tuple in \(m / s ^ 2\)

property range: int

Range is fixed. Updating the range is not implemented.

class adafruit_adxl37x.DataRate

Stub class for data rate.

class adafruit_adxl37x.Range

Stub class for range.