-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Taiki Komoda
committed
Oct 30, 2023
1 parent
78f6e69
commit 5bf85b8
Showing
4 changed files
with
67 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 JG for Cedar Grove Maker Studios | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
# Circuitpython_MPU6886 | ||
|
||
This repo is only copy of https://github.com/adafruit/Adafruit_CircuitPython_MPU6050 and changed minimally for minimum verification. | ||
## Introduction | ||
|
||
Not all functions is confirmed functional. | ||
CircuitPython helper library for the MPU6886 6-DoF Accelerometer and Gyroscope | ||
|
||
## Dependencies | ||
|
||
This driver depends on: | ||
|
||
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_ | ||
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_ | ||
* `Register <https://github.com/adafruit/Adafruit_CircuitPython_Register>`_ | ||
|
||
Please ensure all dependencies are available on the CircuitPython filesystem. | ||
|
||
## Usage Example | ||
|
||
``` | ||
import time | ||
import board | ||
import mpu6886 | ||
i2c = board.I2C() # uses board.SCL and board.SDA | ||
mpu = mpu6886.MPU6886(i2c) | ||
while True: | ||
print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2"%(mpu.acceleration)) | ||
print("Gyro X:%.2f, Y: %.2f, Z: %.2f degrees/s"%(mpu.gyro)) | ||
print("Temperature: %.2f C"%mpu.temperature) | ||
print("") | ||
time.sleep(1) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#Sample script for MPU6886 | ||
|
||
import time | ||
import board | ||
from busio import I2C | ||
import mpu6886 | ||
|
||
i2c = I2C(board.IMU_SCL, board.IMU_SDA) | ||
mpu = mpu6886.MPU6886(i2c) | ||
|
||
while True: | ||
print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2"%(mpu.acceleration)) | ||
print("Gyro X:%.2f, Y: %.2f, Z: %.2f degrees/s"%(mpu.gyro)) | ||
print("Temperature: %.2f C"%mpu.temperature) | ||
print("") | ||
time.sleep(1) |