diff --git a/README.rst b/README.rst index 623a1fb..8fc825a 100644 --- a/README.rst +++ b/README.rst @@ -21,6 +21,36 @@ Introduction MicroPython Driver for the Accelerometer and Gyro ICM20948 Sensor +Installing with mip +==================== + +To install using mpremote + +.. code-block:: shell + + mpremote mip install github:jposada202020/MicroPython_ICM20948 + +To install directly using a WIFI capable board + +.. code-block:: shell + + mip install github:jposada202020/MicroPython_ICM20948 + + +Installing Library Examples +============================ + +If you want to install library examples: + +.. code-block:: shell + + mpremote mip install github:jposada202020/MicroPython_ICM20948/examples.json + +To install directly using a WIFI capable board + +.. code-block:: shell + + mip install github:jposada202020/MicroPython_ICM20948/examples.json Installing from PyPI diff --git a/examples.json b/examples.json new file mode 100644 index 0000000..1796b10 --- /dev/null +++ b/examples.json @@ -0,0 +1,6 @@ +{ + "urls": [ + ["micropython_icm20948/examples/icm20948_simpletest.py", "github:jposada202020/MicroPython_ICM20948/examples/icm20948_simpletest.py"] + ], + "version": "0.1" +} diff --git a/micropython_icm20948/__init__.py b/micropython_icm20948/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/micropython_icm20948/icm20948.py b/micropython_icm20948/icm20948.py index 7ffd1da..fad4511 100644 --- a/micropython_icm20948/icm20948.py +++ b/micropython_icm20948/icm20948.py @@ -285,7 +285,9 @@ def __init__(self, i2c, address=_REG_WHOAMI): self.gyro_full_scale = FS_500_DPS self.acc_data_rate_divisor = 22 + print("ACC Data rate Divisor", self.acc_data_rate_divisor) self.gyro_data_rate_divisor = 10 + print("ACC data rate", self.acc_data_rate) @property def clock_select(self): diff --git a/packages.json b/packages.json new file mode 100644 index 0000000..039b81f --- /dev/null +++ b/packages.json @@ -0,0 +1,8 @@ +{ + "urls": [ + ["micropython_icm20948/icm20948.py", "github:jposada202020/MicroPython_ICM20948/micropython_icm20948/icm20948.py"], + ["micropython_icm20948/i2c_helpers.py", "github:jposada202020/MicroPython_ICM20948/micropython_icm20948/i2c_helpers.py"], + ["micropython_icm20948/__init__.py", "github:jposada202020/MicroPython_ICM20948/micropython_icm20948/__init__.py"] + ], + "version": "0.1" +}