The goal of the drone is to land on a surface and be able to detect the color and temperature of the surface. After hours of setting up the system that connects to the drone and the controller, our team faced incredible difficulty regarding the python coding of the drone. Even with the help of ChatGPT, tutorials, and library methods, it only led to the creation of a killer drone that clearly did not follow as intended. The more we tried to restart and code from fresh again, the more difficult it became to understand what we were programming the drone to accomplish. However with the guidance of our TA, we were able to find a much easier coding system though Blockly that settled the confusion of the python coding and all the library downloads of unnecessary code and complications. The programing became much easier and we simply used the colored pads given with the drone set to help test the drone's ability to detect color and temperature. Since this system automatically displayed the temperature, we just had to make the drone move to the colored pad and help process the color it was sensing.
Here is the code for our drone that allowed it to move after pressing the play button in both the blocked and python form which was automatically given to us. The code is simple: when the play button is pressed, the LED of the drone is turned off as it isn't needed, then the drone takes off. It goes forward for two seconds at 20% power to assure that it reaches the intended surface to finally land on.
Video of our drone executing the code as follows from above to land on a red colored platform. It first takes off, moves foward, and then lands on the red pad. In the next video just following this is the results of the sensor data from the red landing pad the drone landed on.
After the drone lands on the pad, we are automatically given the sensor data from the drone as the code is connected to the controller which controls the drone and is able to give us feedback on the colors and temperature. the video notes the color being red and the temperature at 38.16 degrees Celcius. The prediction of colors for the drone is set through the program by pressing "new colors" then placing the drone on any given pad we want to take samples of the color from. We took 6 samples of each colored pad so that the drone was able to recognize the color of the red landing pad or even any pad.