GY-87 10-DOF module (MPU6050 + compass + BMP180) with ESP32
Supply 3.3-5 V
Bus I2C
I2C address
0x68 / 0x77 / 0x1E / 0x0D
Measures acceleration, rotation, magnetic field, pressure, temperature
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| VCC_IN | Power | 3V3 | Goes through the on-board regulator |
| 3.3V | Not wired to the ESP32 | — | Regulator output. Leave unconnected when you power VCC_IN |
| GND | Ground | GND | |
| SCL | I2C clock (SCL) | D22 | |
| SDA | I2C data (SDA) | D21 | |
| FSYNC | Not wired to the ESP32 | — | MPU6050 frame sync. Leave unconnected |
| INTA | Interrupt | D35 | MPU6050 interrupt, optional |
| DRDY | Interrupt | VP | Compass data ready, optional |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
Starter code (Arduino)
#include <Wire.h>
void setup() {
Serial.begin(115200);
Wire.begin(21, 22); // SDA = GPIO 21, SCL = GPIO 22
Wire.beginTransmission(0x68);
bool found = Wire.endTransmission() == 0;
Serial.println(found ? "GY-87 10-DOF module (MPU6050 + compass + BMP180) found at 0x68" : "Not found: check power, GND and SDA/SCL");
}
void loop() {}
Sources
- InvenSense MPU-6050 Register Map, I2C 0x68; WHO_AM_I 0x75 reads 0x68
- Bosch BMP180 datasheet, I2C address 0x77
- Honeywell HMC5883L datasheet, I2C 0x1E, visible only after MPU6050 bypass is enabled. Newer boards carry a QMC5883L (0x0D)
Try it in 3D in BoardPilot
Related parts
ADS1015 12-bit ADCADS1115 16-bit ADCADXL375 high-g accelerometer (±200 g)AHT10 temperature + humidityAHT20 + BMP280 combo moduleAHT20 temperature + humidity
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.