From 764411d0d463127ce2835c032f9d38581f131ba3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 25 Nov 2025 18:09:54 -0500 Subject: [PATCH 1/4] Pedometer example: import LSM6DS3TRC Updated sensor import to use LSM6DS3TRC for compatibility with Feather Sense and current breakout. --- examples/lsm6ds_pedometer.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/lsm6ds_pedometer.py b/examples/lsm6ds_pedometer.py index da8d2af..ab528a0 100644 --- a/examples/lsm6ds_pedometer.py +++ b/examples/lsm6ds_pedometer.py @@ -12,7 +12,13 @@ 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.lsm6ds3trc import LSM6DS3TRC as LSM +# from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 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 From f1d806548d530ba8c9653b570af992b95d6c749f Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 25 Nov 2025 18:11:01 -0500 Subject: [PATCH 2/4] Change sensor initialization to use LSM --- examples/lsm6ds_pedometer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lsm6ds_pedometer.py b/examples/lsm6ds_pedometer.py index ab528a0..ad3f866 100644 --- a/examples/lsm6ds_pedometer.py +++ b/examples/lsm6ds_pedometer.py @@ -22,7 +22,7 @@ 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 From b45011b14e94a301b86da78348c1ca1cb8307e59 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 25 Nov 2025 18:13:54 -0500 Subject: [PATCH 3/4] Update examples/lsm6ds_pedometer.py --- examples/lsm6ds_pedometer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/lsm6ds_pedometer.py b/examples/lsm6ds_pedometer.py index ad3f866..104335b 100644 --- a/examples/lsm6ds_pedometer.py +++ b/examples/lsm6ds_pedometer.py @@ -17,8 +17,9 @@ # 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.lsm6ds3trc import LSM6DS3TRC as LSM + # 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 From df156e94b5ce2ad4790966f8af75687b8c52bf1f Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 25 Nov 2025 18:16:31 -0500 Subject: [PATCH 4/4] Update examples/lsm6ds_pedometer.py --- examples/lsm6ds_pedometer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lsm6ds_pedometer.py b/examples/lsm6ds_pedometer.py index 104335b..83cd100 100644 --- a/examples/lsm6ds_pedometer.py +++ b/examples/lsm6ds_pedometer.py @@ -17,7 +17,7 @@ # 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