Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkomde/circuitpython_mpu6886
CircuitPython helper library for the MPU6886 6-DoF Accelerometer and Gyroscope
https://github.com/tkomde/circuitpython_mpu6886
circuitpython
Last synced: 20 days ago
JSON representation
CircuitPython helper library for the MPU6886 6-DoF Accelerometer and Gyroscope
- Host: GitHub
- URL: https://github.com/tkomde/circuitpython_mpu6886
- Owner: tkomde
- License: mit
- Created: 2023-10-09T05:33:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-30T01:22:42.000Z (about 1 year ago)
- Last Synced: 2024-12-20T01:44:25.290Z (20 days ago)
- Topics: circuitpython
- Language: Python
- Homepage:
- Size: 68.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Introduction
============CircuitPython helper library for the MPU6886 6-DoF Accelerometer and Gyroscope
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://adafru.it/discord
:alt: Discord.. image:: https://github.com/jins-tkomoda/CircuitPython_MPU6886/workflows/Build%20CI/badge.svg
:target: https://github.com/jins-tkomoda/CircuitPython_MPU6886/actions
:alt: Build Status.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: BlackDependencies
=============
This driver depends on:* `Adafruit CircuitPython `_
* `Bus Device `_
* `Register `_Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle `_
or individual libraries can be installed using
`circup `_.Installing from PyPI
=====================.. note:: This library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!Installing to a Connected CircuitPython Device with Circup
==========================================================Make sure that you have ``circup`` installed in your Python environment.
Install it with the following command if necessary:.. code-block:: shell
pip3 install circup
With ``circup`` installed and your CircuitPython device connected use the
following command to install:.. code-block:: shell
circup install mpu6886
Or the following command to update an existing version:
.. code-block:: shell
circup update
Usage Example
=============.. code-block:: python3
import time
import board
import mpu6886i2c = board.I2C() # uses board.SCL and board.SDA
mpu = mpu6886.MPU6886(i2c)while True:
ac = mpu.acceleration
gy = mpu.gyro
print(f"Acceleration: X:{ac[0]:.2f}, Y:{ac[1]:.2f}, Z:{ac[2]:.2f} m/s^2")
print(f"Gyro X:{gy[0]:.2f}, Y:{gy[1]:.2f}, Z:{gy[2]:.2f} rad/s")
print(f"Temperature: {mpu.temperature:.2f} C")
print("")
time.sleep(1)Documentation
=============
API documentation for this library can be found on `Read the Docs `_.For information on building library documentation, please check out
`this guide `_.Contributing
============Contributions are welcome! Please read our `Code of Conduct
`_
before contributing to help this project stay welcoming.