From 64ee24bb2c3137f55bead42fb9c159f83c06e49f Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sat, 17 Apr 2021 23:29:00 -0400 Subject: [PATCH 1/7] improving docs, including learning guides, and ICM20948 breakout in hardware API. Including all examples in API. Re-arranging doc order in api.rst --- adafruit_icm20x.py | 144 ++++++++++++++++++++++++++++++++++++--------- docs/api.rst | 1 + docs/examples.rst | 47 ++++++++++++++- docs/index.rst | 4 ++ 4 files changed, 165 insertions(+), 31 deletions(-) diff --git a/adafruit_icm20x.py b/adafruit_icm20x.py index 9ba217a..29b6bdc 100644 --- a/adafruit_icm20x.py +++ b/adafruit_icm20x.py @@ -112,25 +112,25 @@ def is_valid(cls, value): class AccelRange(CV): - """Options for ``accelerometer_range``""" + """Options for :attr:`ICM20X.accelerometer_range`""" pass # pylint: disable=unnecessary-pass class GyroRange(CV): - """Options for ``gyro_data_range``""" + """Options for :attr:`ICM20X.gyro_data_range`""" pass # pylint: disable=unnecessary-pass class GyroDLPFFreq(CV): - """Options for ``gyro_dlpf_cutoff``""" + """Options for :attr:`ICM20X.gyro_dlpf_cutoff`""" pass # pylint: disable=unnecessary-pass class AccelDLPFFreq(CV): - """Options for ``accel_dlpf_cutoff``""" + """Options for :attr:`ICM20X.accel_dlpf_cutoff`""" pass # pylint: disable=unnecessary-pass @@ -140,7 +140,7 @@ class ICM20X: # pylint:disable=too-many-instance-attributes :param ~busio.I2C i2c_bus: The I2C bus the ICM20X is connected to. - :param address: The I2C slave address of the sensor + :param int address: The I2C slave address of the sensor """ @@ -227,7 +227,7 @@ def __init__(self, i2c_bus, address): self.initialize() def initialize(self): - """Configure the sensors with the default settings. For use after calling `reset()`""" + """Configure the sensors with the default settings. For use after calling :meth:`reset`""" self._sleep = False self.accelerometer_range = AccelRange.RANGE_8G # pylint: disable=no-member @@ -262,7 +262,7 @@ def _sleep(self, sleep_enabled): @property def acceleration(self): - """The x, y, z acceleration values returned in a 3-tuple and are in m / s ^ 2.""" + """The x, y, z acceleration values returned in a 3-tuple and are in :math:`m / s ^ 2.`""" self._bank = 0 raw_accel_data = self._raw_accel_data sleep(0.005) @@ -275,7 +275,8 @@ def acceleration(self): @property def gyro(self): - """The x, y, z angular velocity values returned in a 3-tuple and are in degrees / second""" + """The x, y, z angular velocity values returned in a 3-tuple and + are in :math:`degrees / second`""" self._bank = 0 raw_gyro_data = self._raw_gyro_data x = self._scale_gyro_data(raw_gyro_data[0]) @@ -331,12 +332,19 @@ def gyro_range(self, value): @property def accelerometer_data_rate_divisor(self): - """The divisor for the rate at which accelerometer measurements are taken in Hz + """ + The divisor for the rate at which accelerometer measurements are taken in Hz + + .. note:: + The data rates are set indirectly by setting a rate divisor according to the + following formula: + + .. math:: - Note: The data rates are set indirectly by setting a rate divisor according to the - following formula: ``accelerometer_data_rate = 1125/(1+divisor)`` + \\text{accelerometer_data_rate} = \\frac{1125}{1 + divisor} This function sets the raw rate divisor. + """ self._bank = 2 raw_rate_divisor = self._accel_rate_divisor @@ -355,10 +363,16 @@ def accelerometer_data_rate_divisor(self, value): @property def gyro_data_rate_divisor(self): - """The divisor for the rate at which gyro measurements are taken in Hz + """ + The divisor for the rate at which gyro measurements are taken in Hz - Note: The data rates are set indirectly by setting a rate divisor according to the - following formula: ``gyro_data_rate = 1100/(1+divisor)`` + .. note:: + The data rates are set indirectly by setting a rate divisor according to the + following formula: + + .. math:: + + \\text{gyro_data_rate} = \\frac{1100}{1 + divisor} This function sets the raw rate divisor. """ @@ -388,8 +402,14 @@ def _gyro_rate_calc(self, divisor): # pylint:disable=no-self-use def accelerometer_data_rate(self): """The rate at which accelerometer measurements are taken in Hz - Note: The data rates are set indirectly by setting a rate divisor according to the - following formula: ``accelerometer_data_rate = 1125/(1+divisor)`` + .. note:: + + The data rates are set indirectly by setting a rate divisor according to the + following formula: + + .. math:: + + \\text{accelerometer_data_rate} = \\frac{1125}{1 + divisor} This function does the math to find the divisor from a given rate but it will not be exactly as specified. @@ -408,8 +428,14 @@ def accelerometer_data_rate(self, value): def gyro_data_rate(self): """The rate at which gyro measurements are taken in Hz - Note: The data rates are set indirectly by setting a rate divisor according to the - following formula: ``gyro_data_rate = 1100/(1+divisor)`` + .. note:: + The data rates are set indirectly by setting a rate divisor according to the + following formula: + + .. math:: + + \\text{gyro_data_rate } = \\frac{1100}{1 + divisor} + This function does the math to find the divisor from a given rate but it will not be exactly as specified. """ @@ -429,8 +455,11 @@ def accel_dlpf_cutoff(self): above the given frequency will be filtered out. Must be an ``AccelDLPFCutoff``. Use AccelDLPFCutoff.DISABLED to disable the filter - **Note** readings immediately following setting a cutoff frequency will be - inaccurate due to the filter "warming up" """ + .. note:: + Readings immediately following setting a cutoff frequency will be + inaccurate due to the filter "warming up" + + """ self._bank = 2 return self._accel_dlpf_config @@ -452,8 +481,11 @@ def gyro_dlpf_cutoff(self): given frequency will be filtered out. Must be a ``GyroDLPFFreq``. Use GyroDLPFCutoff.DISABLED to disable the filter - **Note** readings immediately following setting a cutoff frequency will be - inaccurate due to the filter "warming up" """ + .. note:: + Readings immediately following setting a cutoff frequency will be + inaccurate due to the filter "warming up" + + """ self._bank = 2 return self._gyro_dlpf_config @@ -484,7 +516,33 @@ class ICM20649(ICM20X): """Library for the ST ICM-20649 Wide-Range 6-DoF Accelerometer and Gyro. :param ~busio.I2C i2c_bus: The I2C bus the ICM20649 is connected to. - :param address: The I2C slave address of the sensor + :param int address: The I2C slave address of the sensor. Defaults to :const:`0x68` + + **Quickstart: Importing and using the ICM20649 temperature sensor** + + Here is one way of importing the `ICM20649` class so you can use it with the name ``icm``. + First you will need to import the libraries to use the sensor + + .. code-block:: python + + import busio + import board + import adafruit_icm20x + + Once this is done you can define your `busio.I2C` object and define your sensor object + + .. code-block:: python + + i2c = busio.I2C(board.SCL, board.SDA) + icm = adafruit_icm20x.ICM20649(i2c) + + Now you have access to the acceleration using :attr:`acceleration` attribute and + the gyro information using the :attr:`gyro` attribute. + + .. code-block:: python + + acceleration = icm.acceleration + gyro = icm.gyro """ @@ -526,7 +584,7 @@ def __init__(self, i2c_bus, address=_ICM20649_DEFAULT_ADDRESS): class MagDataRate(CV): - """Options for ``magnetometer_data_rate``""" + """Options for :attr:`ICM20948.magnetometer_data_rate`""" pass # pylint: disable=unnecessary-pass @@ -535,7 +593,37 @@ class ICM20948(ICM20X): # pylint:disable=too-many-instance-attributes """Library for the ST ICM-20948 Wide-Range 6-DoF Accelerometer and Gyro. :param ~busio.I2C i2c_bus: The I2C bus the ICM20948 is connected to. - :param address: The I2C slave address of the sensor + :param int address: The I2C slave address of the sensor. Defaults to :const:`0x69` + + **Quickstart: Importing and using the ICM20948 temperature sensor** + + Here is one way of importing the `ICM20948` class so you can use it with the name ``icm``. + First you will need to import the libraries to use the sensor + + .. code-block:: python + + import busio + import board + import adafruit_icm20x + + Once this is done you can define your `busio.I2C` object and define your sensor object + + .. code-block:: python + + i2c = busio.I2C(board.SCL, board.SDA) + icm = adafruit_icm20x.ICM20948(i2c) + + Now you have access to the acceleration using :attr:`acceleration` attribute, + the gyro information using the :attr:`gyro` attribute and the magnetic information + using the :attr:`magnetic` attribute + + .. code-block:: python + + acceleration = icm.acceleration + gyro = icm.gyro + magnetic = icm.magnetic + + """ _slave_finished = ROBit(_ICM20X_I2C_MST_STATUS, 6) @@ -670,7 +758,7 @@ def magnetic(self): @property def magnetometer_data_rate(self): - """The rate at which the magenetometer takes measurements to update its output registers""" + """The rate at which the magnetometer takes measurements to update its output registers""" # read mag DR register self._read_mag_register(_AK09916_CNTL2) @@ -707,7 +795,7 @@ def _read_mag_register(self, register_addr, slave_addr=0x0C): finished = False for _i in range(100): finished = self._slave_finished - if finished: # bueno! + if finished: # bueno! :) break sleep(0.010) @@ -737,7 +825,7 @@ def _write_mag_register(self, register_addr, value, slave_addr=0x0C): finished = False for _i in range(100): finished = self._slave_finished - if finished: # bueno! + if finished: # bueno! :) break sleep(0.010) diff --git a/docs/api.rst b/docs/api.rst index 69a0acf..5daf107 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -6,3 +6,4 @@ .. automodule:: adafruit_icm20x :members: + :member-order: bysource diff --git a/docs/examples.rst b/docs/examples.rst index a196558..6bf07fe 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1,12 +1,53 @@ -Simple test ------------- +ICM20649 Simple test +-------------------- -Ensure your device works with one of these simple tests. +Ensure your ICM20649 device works with one of these simple tests. .. literalinclude:: ../examples/icm20x_icm20649_simpletest.py :caption: examples/icm20x_icm20649_simpletest.py :linenos: +ICM20649 Full test +------------------ + +Test using all the ICM20649 sensor capabilities + +.. literalinclude:: ../examples/icm20x_icm20649_full_test.py + :caption: examples/examples/icm20x_icm20649_full_test.py + :linenos: + +ICM20948 Simple test +-------------------- + +Ensure your ICM20948 device works with one of these simple tests. + .. literalinclude:: ../examples/icm20x_icm20948_simpletest.py :caption: examples/icm20x_icm20948_simpletest.py :linenos: + +ICM20948 Acceleration data rate test +------------------------------------ + +Example showing ICM20948 sensor cycling between two acceleration data rates + +.. literalinclude:: ../examples/icm20x_icm20948_accel_data_rate_test.py + :caption: examples/icm20x_icm20948_accel_data_rate_test.py + :linenos: + +ICM20948 Gyro data rate test +---------------------------- + +Example showing ICM20948 sensor cycling between two gyro data rates + +.. literalinclude:: ../examples/icm20x_icm20948_gyro_data_rate_test.py + :caption: examples/icm20x_icm20948_gyro_data_rate_test.py + :linenos: + +ICM20948 Magnetic data rate test +-------------------------------- + +Example showing ICM20948 sensor cycling between two magnetic data rates + +.. literalinclude:: ../examples/icm20x_icm20948_mag_data_rate_test.py + :caption: examples/icm20x_icm20948_mag_data_rate_test.py + :linenos: diff --git a/docs/index.rst b/docs/index.rst index 7001a29..5339d8b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,10 +23,14 @@ Table of Contents .. toctree:: :caption: Tutorials + Adafruit's ICM20649 Learning Guide + Adafruit's ICM20948 Learning Guide + .. toctree:: :caption: Related Products Adafruit's ICM20649 Breakout + Adafruit's ICM20948 Breakout .. toctree:: From 9ea5fdd92a72c904c60cc5850c5ff981b0b4f31d Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sun, 18 Apr 2021 11:26:14 -0400 Subject: [PATCH 2/7] Changing phrasing in example code in read_the_docs --- adafruit_icm20x.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_icm20x.py b/adafruit_icm20x.py index 29b6bdc..3f01898 100644 --- a/adafruit_icm20x.py +++ b/adafruit_icm20x.py @@ -520,7 +520,7 @@ class ICM20649(ICM20X): **Quickstart: Importing and using the ICM20649 temperature sensor** - Here is one way of importing the `ICM20649` class so you can use it with the name ``icm``. + Here is an example of using the `ICM2020649` class.. First you will need to import the libraries to use the sensor .. code-block:: python @@ -597,7 +597,7 @@ class ICM20948(ICM20X): # pylint:disable=too-many-instance-attributes **Quickstart: Importing and using the ICM20948 temperature sensor** - Here is one way of importing the `ICM20948` class so you can use it with the name ``icm``. + Here is an example of using the `ICM20948` class. First you will need to import the libraries to use the sensor .. code-block:: python From 025f525e18bf1bc2c7aeaf734232ee01386ce62c Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sun, 18 Apr 2021 11:27:08 -0400 Subject: [PATCH 3/7] Changing phrasing in example code in read_the_docs --- adafruit_icm20x.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_icm20x.py b/adafruit_icm20x.py index 3f01898..9eceabc 100644 --- a/adafruit_icm20x.py +++ b/adafruit_icm20x.py @@ -520,7 +520,7 @@ class ICM20649(ICM20X): **Quickstart: Importing and using the ICM20649 temperature sensor** - Here is an example of using the `ICM2020649` class.. + Here is an example of using the `ICM2020649` class. First you will need to import the libraries to use the sensor .. code-block:: python From de35db3695d3ddafde4aba8054b17c5723abf654 Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sun, 18 Apr 2021 12:02:06 -0400 Subject: [PATCH 4/7] Correcting class reference --- adafruit_icm20x.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_icm20x.py b/adafruit_icm20x.py index 9eceabc..2e09aeb 100644 --- a/adafruit_icm20x.py +++ b/adafruit_icm20x.py @@ -520,7 +520,7 @@ class ICM20649(ICM20X): **Quickstart: Importing and using the ICM20649 temperature sensor** - Here is an example of using the `ICM2020649` class. + Here is an example of using the :class:`ICM2020649` class. First you will need to import the libraries to use the sensor .. code-block:: python @@ -597,7 +597,7 @@ class ICM20948(ICM20X): # pylint:disable=too-many-instance-attributes **Quickstart: Importing and using the ICM20948 temperature sensor** - Here is an example of using the `ICM20948` class. + Here is an example of using the :class:`ICM20948` class. First you will need to import the libraries to use the sensor .. code-block:: python From e1758e0a84d5181247336e4ad499496dd9f7fcae Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Mon, 19 Apr 2021 19:53:54 -0400 Subject: [PATCH 5/7] changing busio.I2c to board.I2C --- README.rst | 6 ++---- adafruit_icm20x.py | 16 +++++++--------- examples/icm20x_icm20649_full_test.py | 3 +-- examples/icm20x_icm20649_simpletest.py | 3 +-- examples/icm20x_icm20948_accel_data_rate_test.py | 3 +-- examples/icm20x_icm20948_gyro_data_rate_test.py | 3 +-- examples/icm20x_icm20948_mag_data_rate_test.py | 3 +-- examples/icm20x_icm20948_simpletest.py | 3 +-- 8 files changed, 15 insertions(+), 25 deletions(-) diff --git a/README.rst b/README.rst index 0d1a0c7..b791757 100644 --- a/README.rst +++ b/README.rst @@ -62,10 +62,9 @@ For use with the ICM20649: import time import board - import busio import adafruit_icm20x - i2c = busio.I2C(board.SCL, board.SDA) + i2c = board.I2C() # uses board.SCL and board.SDA icm = adafruit_icm20x.ICM20649(i2c) while True: @@ -80,10 +79,9 @@ For use with the ICM20948: import time import board - import busio import adafruit_icm20x - i2c = busio.I2C(board.SCL, board.SDA) + i2c = board.I2C() # uses board.SCL and board.SDA icm = adafruit_icm20x.ICM20948(i2c) while True: diff --git a/adafruit_icm20x.py b/adafruit_icm20x.py index 2e09aeb..b089b26 100644 --- a/adafruit_icm20x.py +++ b/adafruit_icm20x.py @@ -139,7 +139,7 @@ class ICM20X: # pylint:disable=too-many-instance-attributes """Library for the ST ICM-20X Wide-Range 6-DoF Accelerometer and Gyro Family - :param ~busio.I2C i2c_bus: The I2C bus the ICM20X is connected to. + :param ~board.I2C i2c_bus: The I2C bus the ICM20X is connected to. :param int address: The I2C slave address of the sensor """ @@ -515,7 +515,7 @@ def _low_power(self, enabled): class ICM20649(ICM20X): """Library for the ST ICM-20649 Wide-Range 6-DoF Accelerometer and Gyro. - :param ~busio.I2C i2c_bus: The I2C bus the ICM20649 is connected to. + :param ~board.I2C i2c_bus: The I2C bus the ICM20649 is connected to. :param int address: The I2C slave address of the sensor. Defaults to :const:`0x68` **Quickstart: Importing and using the ICM20649 temperature sensor** @@ -525,15 +525,14 @@ class ICM20649(ICM20X): .. code-block:: python - import busio import board import adafruit_icm20x - Once this is done you can define your `busio.I2C` object and define your sensor object + Once this is done you can define your `board.I2C` object and define your sensor object .. code-block:: python - i2c = busio.I2C(board.SCL, board.SDA) + i2c = board.I2C() # uses board.SCL and board.SDA icm = adafruit_icm20x.ICM20649(i2c) Now you have access to the acceleration using :attr:`acceleration` attribute and @@ -592,7 +591,7 @@ class MagDataRate(CV): class ICM20948(ICM20X): # pylint:disable=too-many-instance-attributes """Library for the ST ICM-20948 Wide-Range 6-DoF Accelerometer and Gyro. - :param ~busio.I2C i2c_bus: The I2C bus the ICM20948 is connected to. + :param ~board.I2C i2c_bus: The I2C bus the ICM20948 is connected to. :param int address: The I2C slave address of the sensor. Defaults to :const:`0x69` **Quickstart: Importing and using the ICM20948 temperature sensor** @@ -602,15 +601,14 @@ class ICM20948(ICM20X): # pylint:disable=too-many-instance-attributes .. code-block:: python - import busio import board import adafruit_icm20x - Once this is done you can define your `busio.I2C` object and define your sensor object + Once this is done you can define your `board.I2C` object and define your sensor object .. code-block:: python - i2c = busio.I2C(board.SCL, board.SDA) + i2c = board.I2C() # uses board.SCL and board.SDA icm = adafruit_icm20x.ICM20948(i2c) Now you have access to the acceleration using :attr:`acceleration` attribute, diff --git a/examples/icm20x_icm20649_full_test.py b/examples/icm20x_icm20649_full_test.py index 30fd403..bd9c551 100644 --- a/examples/icm20x_icm20649_full_test.py +++ b/examples/icm20x_icm20649_full_test.py @@ -3,7 +3,6 @@ import time import board -import busio from adafruit_icm20x import ICM20649, AccelRange, GyroRange @@ -15,7 +14,7 @@ def printNewMax(value, current_max, axis): # pylint:disable=no-member -i2c = busio.I2C(board.SCL, board.SDA) +i2c = board.I2C() # uses board.SCL and board.SDA ism = ICM20649(i2c) diff --git a/examples/icm20x_icm20649_simpletest.py b/examples/icm20x_icm20649_simpletest.py index b57a42a..7591c23 100644 --- a/examples/icm20x_icm20649_simpletest.py +++ b/examples/icm20x_icm20649_simpletest.py @@ -3,10 +3,9 @@ import time import board -import busio import adafruit_icm20x -i2c = busio.I2C(board.SCL, board.SDA) +i2c = board.I2C() # uses board.SCL and board.SDA icm = adafruit_icm20x.ICM20649(i2c) while True: diff --git a/examples/icm20x_icm20948_accel_data_rate_test.py b/examples/icm20x_icm20948_accel_data_rate_test.py index aa92bc1..7ba0431 100644 --- a/examples/icm20x_icm20948_accel_data_rate_test.py +++ b/examples/icm20x_icm20948_accel_data_rate_test.py @@ -3,11 +3,10 @@ import time import board -import busio from adafruit_icm20x import ICM20948 cycles = 200 -i2c = busio.I2C(board.SCL, board.SDA) +i2c = board.I2C() # uses board.SCL and board.SDA icm = ICM20948(i2c) # Cycle between two data rates diff --git a/examples/icm20x_icm20948_gyro_data_rate_test.py b/examples/icm20x_icm20948_gyro_data_rate_test.py index 07ad506..e8f7f39 100644 --- a/examples/icm20x_icm20948_gyro_data_rate_test.py +++ b/examples/icm20x_icm20948_gyro_data_rate_test.py @@ -3,11 +3,10 @@ import time import board -import busio from adafruit_icm20x import ICM20948 cycles = 200 -i2c = busio.I2C(board.SCL, board.SDA) +i2c = board.I2C() # uses board.SCL and board.SDA icm = ICM20948(i2c) # Cycle between two data rates diff --git a/examples/icm20x_icm20948_mag_data_rate_test.py b/examples/icm20x_icm20948_mag_data_rate_test.py index 84a9b81..4ab7565 100644 --- a/examples/icm20x_icm20948_mag_data_rate_test.py +++ b/examples/icm20x_icm20948_mag_data_rate_test.py @@ -4,11 +4,10 @@ # pylint: disable=no-member import time import board -import busio from adafruit_icm20x import MagDataRate, ICM20948 cycles = 200 -i2c = busio.I2C(board.SCL, board.SDA) +i2c = board.I2C() # uses board.SCL and board.SDA icm = ICM20948(i2c) # Cycle between two data rates diff --git a/examples/icm20x_icm20948_simpletest.py b/examples/icm20x_icm20948_simpletest.py index 3713e84..6315a0c 100644 --- a/examples/icm20x_icm20948_simpletest.py +++ b/examples/icm20x_icm20948_simpletest.py @@ -3,10 +3,9 @@ import time import board -import busio import adafruit_icm20x -i2c = busio.I2C(board.SCL, board.SDA) +i2c = board.I2C() # uses board.SCL and board.SDA icm = adafruit_icm20x.ICM20948(i2c) while True: From e965d7a5f3de13e34beb2ffc999282d75c4ff214 Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Thu, 22 Apr 2021 14:45:34 -0400 Subject: [PATCH 6/7] Parameter description change --- adafruit_icm20x.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_icm20x.py b/adafruit_icm20x.py index b089b26..62ea829 100644 --- a/adafruit_icm20x.py +++ b/adafruit_icm20x.py @@ -139,7 +139,7 @@ class ICM20X: # pylint:disable=too-many-instance-attributes """Library for the ST ICM-20X Wide-Range 6-DoF Accelerometer and Gyro Family - :param ~board.I2C i2c_bus: The I2C bus the ICM20X is connected to. + :param ~busio.I2C i2c_bus: The I2C bus the ICM20X is connected to. :param int address: The I2C slave address of the sensor """ @@ -515,7 +515,7 @@ def _low_power(self, enabled): class ICM20649(ICM20X): """Library for the ST ICM-20649 Wide-Range 6-DoF Accelerometer and Gyro. - :param ~board.I2C i2c_bus: The I2C bus the ICM20649 is connected to. + :param ~busio.I2C i2c_bus: The I2C bus the ICM20649 is connected to. :param int address: The I2C slave address of the sensor. Defaults to :const:`0x68` **Quickstart: Importing and using the ICM20649 temperature sensor** @@ -591,7 +591,7 @@ class MagDataRate(CV): class ICM20948(ICM20X): # pylint:disable=too-many-instance-attributes """Library for the ST ICM-20948 Wide-Range 6-DoF Accelerometer and Gyro. - :param ~board.I2C i2c_bus: The I2C bus the ICM20948 is connected to. + :param ~busio.I2C i2c_bus: The I2C bus the ICM20948 is connected to. :param int address: The I2C slave address of the sensor. Defaults to :const:`0x69` **Quickstart: Importing and using the ICM20948 temperature sensor** From 5c27ce9680bb3ee3f51d3810496bea7ea2aab812 Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Fri, 23 Apr 2021 18:14:09 -0400 Subject: [PATCH 7/7] changing address reference --- adafruit_icm20x.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_icm20x.py b/adafruit_icm20x.py index 62ea829..71132fe 100644 --- a/adafruit_icm20x.py +++ b/adafruit_icm20x.py @@ -140,7 +140,7 @@ class ICM20X: # pylint:disable=too-many-instance-attributes :param ~busio.I2C i2c_bus: The I2C bus the ICM20X is connected to. - :param int address: The I2C slave address of the sensor + :param int address: The I2C address of the device. """ @@ -516,7 +516,7 @@ class ICM20649(ICM20X): """Library for the ST ICM-20649 Wide-Range 6-DoF Accelerometer and Gyro. :param ~busio.I2C i2c_bus: The I2C bus the ICM20649 is connected to. - :param int address: The I2C slave address of the sensor. Defaults to :const:`0x68` + :param int address: The I2C address of the device. Defaults to :const:`0x68` **Quickstart: Importing and using the ICM20649 temperature sensor** @@ -592,7 +592,7 @@ class ICM20948(ICM20X): # pylint:disable=too-many-instance-attributes """Library for the ST ICM-20948 Wide-Range 6-DoF Accelerometer and Gyro. :param ~busio.I2C i2c_bus: The I2C bus the ICM20948 is connected to. - :param int address: The I2C slave address of the sensor. Defaults to :const:`0x69` + :param int address: The I2C address of the device. Defaults to :const:`0x69` **Quickstart: Importing and using the ICM20948 temperature sensor**