The 1D Altitude project aims to develop an altitude control interface for Dylan to accurately measure drone height and to command drone throttle to a target altitude.
arduino_sensor contains the code run on an Arduino attached to a linear distance sensor (potentiometer) and transmits altitude measurement data to the Python program 1d_pid.py. This Python program contanis a basic UI developed in curses, allowing for manual and PID control of a connected quadcopter. Depending on the measured altitude and the target altitude, 1d_pid.py calculates how much throttle to send to the drone in order to reach the target altitude. Serial communication is used to transmit measured altitude data between Arduino and Python and YAMPSpy is used to communicate drone commands over Multiwii Serial Protocol to a Betaflight supported flight controller. After exiting out of the UI, a plot is generated detailing the measured and target altitudes, PID control output, and throttle output.
a- Armr- Rebootd- Disarmm- Mode (Manual and PID control)
Manual Mode
w/e- Increase/decrease throttleArrow Keys- Pitch and Roll
PID Control Mode
t- Set target altitude


