diff --git a/README.rst b/README.rst index f5ac48f..e2d34c2 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ Introduction :target: https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS/actions :alt: Build Status -CircuitPython library for the ST LSM6DSOX, LSM6DS33, and ISM330DHCT 6-dof Accelerometer and Gyros +CircuitPython library for the ST LSM6DSOX, LSM6DS33, and ISM330DHCX 6-dof Accelerometer and Gyros Dependencies diff --git a/adafruit_lsm6ds.py b/adafruit_lsm6ds.py index 82253d0..c54bfcc 100644 --- a/adafruit_lsm6ds.py +++ b/adafruit_lsm6ds.py @@ -63,7 +63,7 @@ _LSM6DS_DEFAULT_ADDRESS = const(0x6A) _LSM6DS_CHIP_ID = const(0x6C) -_ISM330DHCT_CHIP_ID = const(0x6B) +_ISM330DHCX_CHIP_ID = const(0x6B) _LSM6DS33_CHIP_ID = const(0x69) _LSM6DS_FUNC_CFG_ACCESS = const(0x1) @@ -294,15 +294,15 @@ def accelerometer_range(self, value): def gyro_range(self): """Adjusts the range of values that the sensor can measure, from 125 Degrees/second to 4000 degrees/s. Note that larger ranges will be less accurate. Must be a `GyroRange`. 4000 DPS - is only available for the ISM330DHCT""" + is only available for the ISM330DHCX""" return self._cached_gyro_range @gyro_range.setter def gyro_range(self, value): if not GyroRange.is_valid(value): raise AttributeError("range must be a `GyroRange`") - if value is GyroRange.RANGE_4000_DPS and not isinstance(self, ISM330DHCT): - raise AttributeError("4000 DPS is only available for ISM330DHCT") + if value is GyroRange.RANGE_4000_DPS and not isinstance(self, ISM330DHCX): + raise AttributeError("4000 DPS is only available for ISM330DHCX") if value is GyroRange.RANGE_125_DPS: self._gyro_range_125dps = True @@ -398,7 +398,7 @@ class LSM6DS33(LSM6DS): # pylint: disable=too-many-instance-attributes CHIP_ID = _LSM6DS33_CHIP_ID -class ISM330DHCT(LSM6DS): # pylint: disable=too-many-instance-attributes +class ISM330DHCX(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DS33 6-axis accelerometer and gyroscope. @@ -407,7 +407,7 @@ class ISM330DHCT(LSM6DS): # pylint: disable=too-many-instance-attributes """ - CHIP_ID = _ISM330DHCT_CHIP_ID + CHIP_ID = _ISM330DHCX_CHIP_ID def __init__(self, i2c_bus, address=_LSM6DS_DEFAULT_ADDRESS): super().__init__(i2c_bus, address) diff --git a/examples/lsm6ds_full_test.py b/examples/lsm6ds_full_test.py index 2c89ad0..4272d60 100644 --- a/examples/lsm6ds_full_test.py +++ b/examples/lsm6ds_full_test.py @@ -3,13 +3,13 @@ import busio # pylint:disable=no-member,unused-import -from adafruit_lsm6ds import LSM6DS33, LSM6DSOX, ISM330DHCT, Rate, AccelRange, GyroRange +from adafruit_lsm6ds import LSM6DS33, LSM6DSOX, ISM330DHCX, Rate, AccelRange, GyroRange i2c = busio.I2C(board.SCL, board.SDA) sensor = LSM6DS33(i2c) # sensor = LSM6DSOX(i2c) -# sensor = ISM330DHCT(i2c) +# sensor = ISM330DHCX(i2c) sensor.accelerometer_range = AccelRange.RANGE_8G print( diff --git a/examples/lsm6ds_ism330dhct_simpletest.py b/examples/lsm6ds_ism330dhct_simpletest.py index a5fca83..03fa3d4 100644 --- a/examples/lsm6ds_ism330dhct_simpletest.py +++ b/examples/lsm6ds_ism330dhct_simpletest.py @@ -1,11 +1,11 @@ import time import board import busio -from adafruit_lsm6ds import ISM330DHCT +from adafruit_lsm6ds import ISM330DHCX i2c = busio.I2C(board.SCL, board.SDA) -sensor = ISM330DHCT(i2c) +sensor = ISM330DHCX(i2c) while True: print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2" % (sensor.acceleration)) diff --git a/examples/lsm6ds_rate_test.py b/examples/lsm6ds_rate_test.py index 8aed524..642edbd 100644 --- a/examples/lsm6ds_rate_test.py +++ b/examples/lsm6ds_rate_test.py @@ -2,13 +2,13 @@ import busio # pylint:disable=no-member,unused-import -from adafruit_lsm6ds import LSM6DS33, LSM6DSOX, ISM330DHCT, Rate +from adafruit_lsm6ds import LSM6DS33, LSM6DSOX, ISM330DHCX, Rate i2c = busio.I2C(board.SCL, board.SDA) sensor = LSM6DS33(i2c) # sensor = LSM6DSOX(i2c) -# sensor = ISM330DHCT(i2c) +# sensor = ISM330DHCX(i2c) while True: sensor.accelerometer_data_rate = Rate.RATE_12_5_HZ diff --git a/setup.py b/setup.py index 8fff2d3..88c1432 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name="adafruit-circuitpython-lsm6ds", use_scm_version=True, setup_requires=["setuptools_scm"], - description="CircuitPython library for the ST LSM6DSOX, LSM6DS33, and ISM330DHCT 6-DOF Accelerometer and Gyros", + description="CircuitPython library for the ST LSM6DSOX, LSM6DS33, and ISM330DHCX 6-DOF Accelerometer and Gyros", long_description=long_description, long_description_content_type="text/x-rst", # The project's main homepage. @@ -48,7 +48,7 @@ "Programming Language :: Python :: 3.5", ], # What does your project relate to? - keywords="adafruit blinka circuitpython micropython lsm6ds lsm6dsox lsm6ds33 icm330dhct imu gyro gyroscope inemo" + keywords="adafruit blinka circuitpython micropython lsm6ds lsm6dsox lsm6ds33 icm330dhcx imu gyro gyroscope inemo" "accelerometer", # You can just specify the packages manually here if your project is # simple. Or you can use find_packages().