Tag Archives: MPU6050

Two Axis Tilt Meter Displaying Pitch and Roll Using an MPU6050 on the Raspberry Pi Pico W

In this video lesson, we demonstrate how to create a two-axis tilt meter. The device displays both the pitch and roll on an OLED. In addition to this quantitative display of tilt and roll, it also shows a carpenter’s level type visual, where a circle, or bubble moves to indicate tilt. When the circle is centered on the crosshairs, the device is flat in both axis.

For your convenience, this is the schematic we are using:

MPU 6050
Schematic for Creating a Tilt Meter

And we also include the code we developed in this lesson.

 

Schematic for Tilt Meter Using the MPU6050

Below we show the detailed schematic we use for the Tilt Meter we are developing based on the MPU6050 IMU sensor.

MPU 6050
Schematic for Creating a Tilt Meter

This is the simple code for measuring acceleration in the x and y axis. We will develop this much further in future lessons, but this is just to verify things are hooked up correctly, and that we can measure accelleration.