How vngreentech/drone_mini works
This repository is an STM32 quadcopter flight controller, alongside a separate test-board firmware. The main firmware enters through Arduino setup/loop, initializes the application, and repeatedly runs its flight-control loop; the sampled application excerpt shows PID-based motor mixing, reset protection, and persistent PID settings. The tree and README identify receiver, IMU, motor, sensor, and OLED subsystems, but their full runtime wiring is not shown. Dashed links mark those unverified integrations; the test-board firmware is represented separately.
Main entry points: APPLICATION.cpp Flight application · IMU.cpp IMU acquisition · LCD.cpp Flight display · MPU6050.cpp MPU6050 driver
Components 20
Flight control
- Arduino entry
FW_DRONE_MINI/src/main.cpp - Flight application
FW_DRONE_MINI/src/APPLICATION/APPLICATION.cpp - RC receiver
FW_DRONE_MINI/src/RECEIVER/RECEIVER.cpp - IMU acquisition
FW_DRONE_MINI/src/IMU/IMU.cpp - PID control
FW_DRONE_MINI/src/PID/PID.cpp - Motor output
FW_DRONE_MINI/src/MOTOR/MOTOR.cpp - Sensor support
FW_DRONE_MINI/src/SENSOR/SENSOR.cpp - Hardware configuration
FW_DRONE_MINI/src/GLOBAL/GLOBAL.h
Device interfaces
- Flight display
FW_DRONE_MINI/src/LCD/LCD.cpp - MPU6050 driver
FW_DRONE_MINI/lib/MPU6050_LIB/MPU6050.cpp - MotionApps DMP
FW_DRONE_MINI/lib/MPU6050_LIB/MPU6050_6Axis_MotionApps20.cpp - EEPROM storage
Embedded libraries
- I2C transport
FW_DRONE_MINI/lib/MPU6050_LIB/I2Cdev.cpp - Kalman filter
FW_DRONE_MINI/lib/SimpleKalmanFilter/src/SimpleKalmanFilter.cpp - OLED graphics
FW_DRONE_MINI/lib/U8g2/src/clib/u8g2.h
Test board
- Board test firmware
FW_TEST_BOARD_UAV_MINI/src/FW_TEST_BOARD.cpp - Test-board MPU driver
FW_TEST_BOARD_UAV_MINI/lib/MPU6050_LIB/MPU6050.cpp
Other components
- RC pilot
- ESCs and motors
- OLED display
Connections 19
- RC pilot → RC receiver: sends channels
- Arduino entry → Flight application: starts and loops
FW_DRONE_MINI/src/main.cpp - Flight application → RC receiver: reads channels
- Flight application → IMU acquisition: reads attitude
- Flight application → PID control: runs control
- Flight application → Motor output: sets outputs
- Flight application → Flight display: updates display
- Flight application → Sensor support: uses sensors
- Flight application → Hardware configuration: uses configuration
- Flight application → EEPROM storage: reads and saves
FW_DRONE_MINI/src/APPLICATION/APPLICATION.cpp - Flight application → ESCs and motors: mixes motor commands
- IMU acquisition → MPU6050 driver: acquires motion
- MPU6050 driver → I2C transport: accesses registers
FW_DRONE_MINI/lib/MPU6050_LIB/MPU6050.cpp - MPU6050 driver → MotionApps DMP: uses DMP
- IMU acquisition → Kalman filter: filters readings
- Flight display → OLED graphics: renders interface
- Flight display → OLED display: writes display
- Board test firmware → Test-board MPU driver: initializes and reads
FW_TEST_BOARD_UAV_MINI/src/FW_TEST_BOARD.cpp - Board test firmware → OLED display: renders test values
FW_TEST_BOARD_UAV_MINI/src/FW_TEST_BOARD.cpp