22#
33# SPDX-License-Identifier: MIT
44"""
5- This module provides the `adafruit_lsm6ds.lsm6ds3 ` subclass of LSM6DS sensors
5+ This module provides the `adafruit_lsm6ds.lsm6ds3trc ` subclass of LSM6DS sensors
66===============================================================================
77"""
8- from . import LSM6DS
8+ from . import LSM6DS , RWBit , const
99
10+ _LSM6DS_CTRL10_C = const (0x19 )
1011
11- class LSM6DS3 (LSM6DS ): # pylint: disable=too-many-instance-attributes
12+ class LSM6DS3TRC (LSM6DS ): # pylint: disable=too-many-instance-attributes
1213
13- """Driver for the LSM6DS3 6-axis accelerometer and gyroscope.
14+ """Driver for the LSM6DS3TR-C 6-axis accelerometer and gyroscope.
1415
15- :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS3 is connected to.
16+ :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS3TR-C is connected to.
1617 :param int address: The I2C device address. Defaults to :const:`0x6A`
1718
1819
1920 **Quickstart: Importing and using the device**
2021
21- Here is an example of using the :class:`LSM6DS3 ` class.
22+ Here is an example of using the :class:`LSM6DS3TRC ` class.
2223 First you will need to import the libraries to use the sensor
2324
2425 .. code-block:: python
2526
2627 import board
27- from adafruit_lsm6ds.lsm6ds3 import LSM6DS3
28+ from adafruit_lsm6ds.lsm6ds3trc import LSM6DS3TRC
2829
2930 Once this is done you can define your `board.I2C` object and define your sensor object
3031
3132 .. code-block:: python
3233
3334 i2c = board.I2C() # uses board.SCL and board.SDA
34- sensor = LSM6DS3 (i2c)
35+ sensor = LSM6DS3TRC (i2c)
3536
3637 Now you have access to the :attr:`acceleration` and :attr:`gyro`: attributes
3738
@@ -43,3 +44,7 @@ class LSM6DS3(LSM6DS): # pylint: disable=too-many-instance-attributes
4344 """
4445
4546 CHIP_ID = 0x6A
47+
48+ # This version of the IMU has a different register for enabling the pedometer
49+ # https://www.st.com/resource/en/datasheet/lsm6ds3tr-c.pdf
50+ _ped_enable = RWBit (_LSM6DS_CTRL10_C , 4 )
0 commit comments