adafruit_lsm6ds

CircuitPython helper library for the LSM6DS family of motion sensors from ST

  • Author(s): Bryan Siepert

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_lsm6ds.AccelHPF

Options for the accelerometer high pass filter

class adafruit_lsm6ds.AccelRange

Options for accelerometer_range

class adafruit_lsm6ds.CV

struct helper

classmethod add_values(value_tuples)

creates CV entires

classmethod is_valid(value)

Returns true if the given value is a member of the CV

class adafruit_lsm6ds.GyroRange

Options for gyro_data_range

class adafruit_lsm6ds.LSM6DS(i2c_bus, address=<sphinx.ext.autodoc.importer._MockObject object>)

Driver for the LSM6DSOX 6-axis accelerometer and gyroscope.

Parameters:
  • i2c_bus (I2C) – The I2C bus the LSM6DSOX is connected to.
  • address – The I2C slave address of the sensor
acceleration

The x, y, z acceleration values returned in a 3-tuple and are in m / s ^ 2.

accelerometer_data_rate

Select the rate at which the accelerometer takes measurements. Must be a Rate

accelerometer_range

Adjusts the range of values that the sensor can measure, from +/- 2G to +/-16G Note that larger ranges will be less accurate. Must be an AccelRange

gyro

The x, y, z angular velocity values returned in a 3-tuple and are in radians / second

gyro_data_rate

Select the rate at which the gyro takes measurements. Must be a Rate

gyro_range

Adjusts the range of values that the sensor can measure, from 125 Degrees/s to 2000 degrees/s. Note that larger ranges will be less accurate. Must be a GyroRange.

high_pass_filter

The high pass filter applied to accelerometer data

pedometer_enable

Whether the pedometer function on the accelerometer is enabled

pedometer_steps

The number of steps detected by the pedometer. You must enable with pedometer_enable before calling. Use pedometer_reset to reset the number of steps

reset()

Resets the sensor’s configuration into an initial state

class adafruit_lsm6ds.Rate

Options for accelerometer_data_rate and gyro_data_rate