← All parts
Adafruit MPU-6050 6-DoF IMU
AdafruitN/A
The Adafruit MPU-6050 is a 6-axis IMU (accelerometer and gyroscope) designed for easy integration into projects.
In stock
Specifications
2- Operating Voltage
- 3.0-5.0VDC (VIN) / 1.65-3.6V (3Vo)
- Logic Level
- 3-5V
Pinout
5| Pin | Name | Functions | Notes |
|---|---|---|---|
| Vin | VCC | POWER | 3-5VDC input |
| 3Vo | 3.3V | POWER | Up to 100mA output |
| GND | GND | GND | Common ground for power and logic |
| SCL | I2C Clock | I2C | Level shifted to support 3-5V logic |
| SDA | I2C Data | I2C | Level shifted to support 3-5V logic |
Interactive pinout
Highlight:
N/A
Click a pin to copy its name · tap a tag above to spotlight a bus.
Starter code
Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.
Arduino (C++)
Arduino library: Adafruit MPU6050 (+ Adafruit Unified Sensor)
arduino
// MPU-6050 6-axis IMU over I2C — community starter example
#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
Adafruit_MPU6050 mpu;
void setup() {
Serial.begin(115200);
Wire.begin();
if (!mpu.begin()) { // default address 0x68
Serial.println("MPU6050 not found");
while (1) delay(10);
}
}
void loop() {
sensors_event_t a, g, temp;
mpu.getEvent(&a, &g, &temp);
Serial.print("ax="); Serial.print(a.acceleration.x);
Serial.print(" gz="); Serial.println(g.gyro.z);
delay(500);
}MicroPython
MicroPython library: mpu6050 (tuupola/micropython-mpu6050)
python
# MPU-6050 over I2C (ESP32) — community starter example
# lib: tuupola/micropython-mpu6050 (mpu6050.py on the board)
from machine import Pin, I2C
import mpu6050, time
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
imu = mpu6050.accel(i2c) # default address 0x68
while True:
print(imu.get_values())
time.sleep(0.5)Wiring
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| VIN | +5V | 3V3 | Level-shifted: 3-5 V safe |
| GND | GND | GND | |
| SCL | A5/SCL | GPIO22 | |
| SDA | A4/SDA | GPIO21 |
Typical uses
- Motion, tilt, and orientation sensing
- Gesture detection and self-balancing robots