This project turns an M5Stack Core2 into a cheap Primary Flight Display (PFD) / EFIS-style attitude indicator using only the built-in MPU6886 IMU(not verry accurate!!).
It shows:
- Artificial horizon (sky/ground) with pitch ladder
- Bank scale
- Slip/skid ball with simple physics model
- Flight Director crossbars (FD)
- Flight Path Vector / bird symbol (FPV)
- Compass heading tape with digital heading display
- pitch/roll values + battery voltage
- Magenta crossbars in the center
- Green FPV symbol showing a rough estimated„flight path“ indication.
- Combines display pitch/roll with linear accelerations
ax,ay: - This is of course not a true FMS calibrated FPV (we have no airspeed / GPS)!
- Heading tape across the bottom:
- Moving scale centered on current heading.
- Central orange triangle pointer.
- Digital heading (000–359°)
- Right: numeric Roll and Pitch.
- Left: Battery voltage from AXP192.
- M5Stack Core2 (with MPU6886 IMU and AXP192 PMIC)
- M5Core2
(which internally uses TFT_eSPI / TFT_eSprite) - Arduino core for ESP32 (standard M5Stack setup)
You can build either with the Arduino IDE or PlatformIO.
- Install the ESP32 board support and the M5Core2 library via Library Manager.
- Select board:
M5Stack-Core2(or corresponding M5Stack Core2 entry)
- Create a new sketch and paste the entire
main.cppcode from this project. - Compile & upload.
Example platformio.ini:
[env:m5stack-core2]
platform = espressif32
board = m5stack-core2
framework = arduino
lib_deps =
m5stack/M5Core2
Have Fun!