Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamjezek98/MPU6050-ESP8266-MicroPython
Simple library for MPU6050 on ESP8266 with micropython
https://github.com/adamjezek98/MPU6050-ESP8266-MicroPython
Last synced: about 16 hours ago
JSON representation
Simple library for MPU6050 on ESP8266 with micropython
- Host: GitHub
- URL: https://github.com/adamjezek98/MPU6050-ESP8266-MicroPython
- Owner: adamjezek98
- Created: 2017-02-04T17:22:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-05T06:26:22.000Z (over 3 years ago)
- Last Synced: 2024-08-02T20:45:00.589Z (3 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 87
- Watchers: 6
- Forks: 36
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mpython - MPU6050-ESP8266-MicroPython - ESP8266 driver for MPU6050 accelerometer/gyroscope. (精选驱动库 / 传感器)
- awesome-micropython - MPU6050-ESP8266-MicroPython - ESP8266 driver for MPU6050 accelerometer/gyroscope. (Libraries / Sensors)
README
# MPU6050-ESP8266-MicroPython
Simple library for MPU6050 on ESP8266 with micropythonSCL connected to pin 5, SDA to pin 4
example usage:```python
>>>from machine import I2C, Pin
>>>import mpu6050
>>>i2c = I2C(scl=Pin(5), sda=Pin(4))
>>>accelerometer = mpu6050.accel(i2c)
>>>accelerometer.get_values()
{'GyZ': -235, 'GyY': 296, 'GyX': 16, 'Tmp': 26.64764, 'AcZ': -1552, 'AcY': -412, 'AcX': 16892}
```
Accelerometer/Gyroscope values are in int16 range (-32768 to 32767)
If the mpu6050 loses power, you have to call __init__() again