Skip to main content

Easy to use python package to use MPU-6050. So get out your project setup and dream up some well-balanced projects

Project description

license: MIT latest PyPI version PyPI download count

A Python module for accessing the MPU-6050 digital accelerometer and gyroscope on a Raspberry Pi.

Example

Assuming that the address of your MPU-6050 is 0x68, you can read read accelerometer data like this:

>>> from MPU6050 import MPU6050

>>> mpu = MPU6050.mpu6050(0x68)

>>> mpu.reset()

>>> mpu.power_manage()

>>> mpu.gyro_config()

>>> mpu.accel_config()

>>> while True:

>>>     gyroscope_data = mpu.read_gyroscope()

>>>     accelerometer_data = mpu.read_accelerometer()

Dependencies

Either the python-smbus or python3-smbus package, according to your Python version.

Installation

There are two ways of installing this package: via PyPi or via the git repository. Installing from the git repository insures that you have the absolute latest version installed, but this can be prone to bugs.

1. install the python-smbus package

sudo apt install python3-smbus

2a. Install this package from PyPi repository

pip install mpu6050-PI

Or:

2b. Clone the repository and run setup.py

git clone https://github.com/addy123d/mpu6050-pi.git
python setup.py install

Issues & Bugs

Please report any issues or bugs here:

https://github.com/addy123d/mpu6050-pi/issues

License

Copyright (c) 2022 Gagan Deepak (gagan@ineuron.ai), Aditya Chaudhary (adityachaudhary@ineuron.ai) and contributors. Available under the MIT License. For more information, see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpu6050-PI-0.0.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpu6050_PI-0.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file mpu6050-PI-0.0.2.tar.gz.

File metadata

  • Download URL: mpu6050-PI-0.0.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for mpu6050-PI-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c22eb7db2184da29bcb767c53a13da6a8175d28528dc29be64d38ec7b3848342
MD5 0d6f98b28b8e33a48f942d1f554aff20
BLAKE2b-256 c7208e0b5979baf4aaa3b70e2705fca8e9c57c86f4aea656e725c31ae3ee632c

See more details on using hashes here.

File details

Details for the file mpu6050_PI-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mpu6050_PI-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for mpu6050_PI-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bad3d9d741387b98699ecde5c91b714b32a2bc7d012cb36bf11998c0da16f91
MD5 019ab2552e7165fcd2e8bf50e1a20f71
BLAKE2b-256 ae9a7671a39a0daa80705a4f099308e29749bf8716f59ffb0e29d0df0edb8072

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page