Skip to content

Commit 764411d

Browse files
authored
Pedometer example: import LSM6DS3TRC
Updated sensor import to use LSM6DS3TRC for compatibility with Feather Sense and current breakout.
1 parent e7da74f commit 764411d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/lsm6ds_pedometer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
from adafruit_lsm6ds import AccelRange, Rate
1313

1414
# pylint:disable=no-member
15-
from adafruit_lsm6ds.lsm6ds33 import LSM6DS33
15+
# Import the correct class for the sensor that you have.
16+
# Change the import as needed. Not all are listed here.
17+
# Note that the LSM6DS3TRC, which is used on the Adafruit Feather Sense,
18+
# uses a different I2C register to enable the pedometer,
19+
# so the device classes are not interchangeable.
20+
from adafruit_lsm6ds.lsm6ds3trc import LSM6DS3TRC as LSM
21+
# from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 as LSM
1622

1723
i2c = board.I2C() # uses board.SCL and board.SDA
1824
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller

0 commit comments

Comments
 (0)