The code portion of the project is divided into two modules (reinforcement learning not complete yet):
- DroneFirmware: contains the C code that is compiled and uploaded to the Arduino to run the drone. Handles transceiver communication, individual control of each motor, interfaces with IMU to determine orientation, and stabilization using PID algorithms
- SerialRemote: Python code that handles user input on a computer (supports keyboard or joystick) and interfaces with the transceiver connected to a USB to Serial module to send commands to the drone. These commands include information about thurst, pitch, roll, yaw, etc. Easy to implement custom interface with user input devices as well as the commands to be sent on the transceiver.
SerialRemote: requirements can be installed by running the following with Python 3 installed (file found in the SerialRemote directory):
pip install -r requirements.txt
DroneFirmware: the following third party libraries are included in the Arduino sketch (not including standard Arduino libraries):
- Adafruit 10DOF
- Adafruit Unified Sensor
- Adafruit BMP085
- Adafruit LSM303
- Adafruit L3GD20
- PID_v2 by Brett Beauregard
Drone is attached to weights to test correct control of motors. Temporary Arduino Uno is used instead of Arduino Nano in final result.