File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1212from 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 uses a different I2C register to enable the pedometer,
18+ # so the device classes are not interchangeable.
19+ from adafruit_lsm6ds .lsm6ds3trc import LSM6DS3TRC as LSM
20+ # from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 as LSM
21+
1622
1723i2c = board .I2C () # uses board.SCL and board.SDA
1824# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
19- sensor = LSM6DS33 (i2c )
25+ sensor = LSM (i2c )
2026
2127# enable accelerometer sensor @ 2G and 26 Hz
2228sensor .accelerometer_range = AccelRange .RANGE_2G
You can’t perform that action at this time.
0 commit comments