PINE64
Having trouble reading MPU6050 sensor via I²C on Pine64 - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: General (https://forum.pine64.org/forumdisplay.php?fid=1)
+--- Forum: Getting Started (https://forum.pine64.org/forumdisplay.php?fid=21)
+--- Thread: Having trouble reading MPU6050 sensor via I²C on Pine64 (/showthread.php?tid=19979)



Having trouble reading MPU6050 sensor via I²C on Pine64 - Jaxon - 09-04-2025

Hello everyone,

I’m trying to read data from the MPU6050 6-axis sensor via I²C on my Pine64 board, but I’m running into some issues.

System: Armbian

I²C is already enabled, and I can see the device address 0x68 with i2cdetect -y 1

My Python script runs, but the data I get is unstable and often jumps around

Has anyone successfully driven the MPU6050 on Pine64? Do I need any additional configuration?

Thanks!


RE: Having trouble reading MPU6050 sensor via I²C on Pine64 - Alex92 - 09-05-2025

I had the same problem when working with the MPU6050 on a Pine64 board, and a few things made the difference:

Use 3.3 V instead of 5 V to avoid level shifting issues.

On initialization, write to register 0x6B (as described in the MPU6050 datasheet) to wake the device from sleep mode.

To smooth out the jitter, apply a simple moving average or even a Kalman filter depending on your needs.

Once I followed the datasheet’s register setup and wiring, the readings became much more stable.