
Off-the-shelf flight controllers hide the interesting parts. I wanted to build a quadcopter from loose boards, make it stay level, and fly it from a phone with no radio transmitter.
Phone, then WiFi, then ESP8266, then PPM, then MultiWii flight controller, then ESCs, then motors.
In Aug 2023 I tried a custom PID controller on an ESP8266 with a Servo/ESC library and a tkinter/UDP control app on the PC, plus an MPU-6050 angle test. It stayed at a few hundred lines and I have no evidence it ever flew, so I moved to MultiWii.
All of my firmware changes live in config.h: MINTHROTTLE 1200 and MAXTHROTTLE 1800 to match the ESC range, I2C at 400 kHz with the internal pull-ups, LOOP_TIME 3000 and the stock PID controller 1. Getting the loop time and I2C speed right matters because the MPU-6050 is read every cycle.
A phone link adds latency and can drop, which is risky on a flying machine. The ESP8266 sends compact 3-byte WebSocket frames (channel, value high, value low) on port 81, and the failsafe cuts throttle if they stop. The ESP firmware itself is upstream work; I did the wiring and the flight controller side.
It hovered. The flight video is an indoor, tethered test over a table (ropes held by people), dated 26 Jun 2024. It lifts off and holds a hover a little above the table. It was not a free outdoor flight.
