User Manual
Python and CircuitPython
It's easy to use the MPU6050 sensor with CircuitPython and the Adafruit CircuitPython MPU6050 (https://adafru.it/GEt)
library. This library allows you to easily write Python code that reads the acceleration and adjust the measurement
settings.
You can use this sensor with any CircuitPython microcontroller board or with a Linux single board computer that has
GPIO and Python thanks to Adafruit_Blinka, our CircuitPython-for-Python compatibility library (https://adafru.it/BSN).
CircuitPython Microcontroller Wiring
First wire up a MPU6050 to your board exactly as follows. Here is an example of the MPU6050 wired to a
Feather (https://adafru.it/Cmy) using I2C:
Board 3V to sensor VIN (red wire)
Board GND to sensor GND (black
wire)
Board SCL to sensor SCL (yellow wire)
Board SDA to sensor SDA (blue wire)
Python Computer Wiring
Since there's
dozens
of Linux computers/boards you can use we will show wiring for Raspberry Pi (https://adafru.it/scY).
For other platforms, please visit the guide for CircuitPython on Linux to see whether your platform is
supported (https://adafru.it/BSN).
Here's the Raspberry Pi wired with I2C:
© Adafruit Industries https://learn.adafruit.com/mpu6050-6-dof-accelerometer-and-gyro Page 13 of 20