Point it and watch a real heading track live on screen, real orientation sensing, the same class of sensor behind a phone's own compass and auto-rotate.
3 real parts included
Total for this kit: 1,170.00 ฿
Doesn't include any order discount you may get at checkout.
This project builds a real orientation display: tilt or rotate the sensor and watch the screen track it live, the same underlying sensing technology behind a phone's auto-rotate and every drone's flight stabilization, just made visible on a small screen instead of hidden inside a bigger device.
What the Controller Does
It continuously reads the sensor's raw motion values, converts them into a usable tilt or heading figure, and updates the display, dozens of times a second, so the readout feels genuinely live rather than laggy.
What the IMU Does
It combines an accelerometer, which senses the direction of gravity, with a gyroscope, which senses rotation speed, giving the controller everything it needs to work out orientation and motion in real time over a simple I2C interface.
What the Display Does
It shows the current tilt or heading reading, either as raw numbers or, with a bit more code, as a simple visual indicator like a horizon line or tilting bar.
Software and Library Concepts
Start by printing the raw accelerometer and gyroscope values to confirm the sensor is wired and communicating correctly, then work on combining them into a stable tilt angle before worrying about the display at all.
Testing and Troubleshooting
Readings drift slowly over time even when the sensor is perfectly still, this is a normal characteristic of gyroscopes, look into a simple complementary or Kalman filter combining both sensors rather than trusting the gyroscope alone.
The sensor reads nothing or a fixed constant value, double check the I2C wiring and address, and confirm no other I2C device on the same bus is using a conflicting address.
Values jump around at rest, the sensor may need a brief calibration step at startup, reading and averaging its resting values before using them as a baseline.
Optional Upgrade
Add the buzzer from the parts bin to sound an alert if the tilt angle crosses a threshold, a simple physical level-alarm built from the same sensor.
Wiring
MPU6050 VCC → ESP32-C3 3.3V
MPU6050 GND → ESP32-C3 GND
MPU6050 SDA → ESP32-C3 GPIO8 (default I2C)
MPU6050 SCL → ESP32-C3 GPIO9 (default I2C)
OLED VCC → ESP32-C3 3.3V
OLED GND → ESP32-C3 GND
OLED SDA → ESP32-C3 GPIO8 (shared bus with MPU6050)
OLED SCL → ESP32-C3 GPIO9 (shared bus with MPU6050)
Be honest with yourself about what this project is: the MPU6050 is an accelerometer + gyroscope only — it has no magnetometer, so it physically cannot sense magnetic north and cannot produce a real compass heading. What's below is a genuine tilt/level display using accelerometer pitch and roll, which is accurate at rest or slow motion. A true magnetic compass would need an added magnetometer (e.g. HMC5883L or QMC5883L), which isn't in this parts list.