diff --git a/examples/lsm6ds_pedometer.py b/examples/lsm6ds_pedometer.py index da8d2af..83cd100 100644 --- a/examples/lsm6ds_pedometer.py +++ b/examples/lsm6ds_pedometer.py @@ -12,11 +12,18 @@ from adafruit_lsm6ds import AccelRange, Rate # pylint:disable=no-member -from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 +# Import the correct class for the sensor that you have. +# Change the import as needed. Not all are listed here. +# Note that the LSM6DS3TRC, which is used on the Adafruit Feather Sense, +# uses a different I2C register to enable the pedometer, +# so the device classes are not interchangeable. +# +# from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 as LSM +from adafruit_lsm6ds.lsm6ds3trc import LSM6DS3TRC as LSM i2c = board.I2C() # uses board.SCL and board.SDA # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller -sensor = LSM6DS33(i2c) +sensor = LSM(i2c) # enable accelerometer sensor @ 2G and 26 Hz sensor.accelerometer_range = AccelRange.RANGE_2G