Skip to main content

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

Project description

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

>>> sensor = mpu6050(0x68)

>>> accelerometer_data = sensor.get_accel_data()

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-raspberrypi

Or:

2b. Clone the repository and run setup.py

git clone https://github.com/Tijndagamer/mpu6050.git
python setup.py install

Issues & Bugs

Please report any issues or bugs here:

https://github.com/Tijndagamer/mpu6050/issues

License

Copyright (c) 2015, 2016, 2017, 2018 Martijn (MrTijn) and contributors
Licensed 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-raspberrypi-1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

mpu6050_raspberrypi-1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file mpu6050-raspberrypi-1.1.tar.gz.

File metadata

  • Download URL: mpu6050-raspberrypi-1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.2

File hashes

Hashes for mpu6050-raspberrypi-1.1.tar.gz
Algorithm Hash digest
SHA256 2bdc47d1aa2c1b7783d6bf37471ea2cb70f4979bb130d5321e9f23746b6779b1
MD5 4448fb678265129644133a6ec2a1ae54
BLAKE2b-256 56ba8009e36b050a9dc8ea8d31f989c01e69db53e65b245fe76dd90d215e2bec

See more details on using hashes here.

Provenance

File details

Details for the file mpu6050_raspberrypi-1.1-py3-none-any.whl.

File metadata

  • Download URL: mpu6050_raspberrypi-1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.2

File hashes

Hashes for mpu6050_raspberrypi-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c8e64791950a25169a42052e97e938792ef869415e4b1dc26146b9af297c812
MD5 aad8cd2e76483da9de44f4dc79d17c01
BLAKE2b-256 f688a98b0d9a057c2d7824e814ba291c0456753a3597cb4a7aab31290a8955e6

See more details on using hashes here.

Provenance

Supported by

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