I am currently working on a project due to the COVID-19, and I have been running into some problems. I firstly wanted to create a drone that is capable of moving around in a specifically controlled area (backyard) horizontally and vertically on its own. I have the drone pre-built but I am not sure what to do next. The quadcopter is meant to be both controlled by a controller and be able to fly around on its own. I lastly was wondering if a flight control board could be connected to an Arduino and what would the code for my original idea look like.
multiwii ← Search on that, 2014 tech. Its where all this drone stuff started and was basically an arduino UNO with gyro/accelerometer +other chips on board. Its the code you want.
You will need to use ESC ( Electronic Speed Controller ), you can easily interface them with Arduino and they do the job. But if you want to do that by your self then you have to write the complete PID control for motors in Arduino.