Goals: The goal of the CoDrone was to code the prebuilt drone to be able to recognize colors and measure temperature based off the color.
Coding Process: While coding our drone, we first attempted to use blocky code to program it. Unfortunately, because of the limitations of the available functions, we could not figure out how to get the drone to fly straight down. This was necessary because the color sensors on the bottom of the drone only worked when the color was right next to them, meaning the drone had to hover only a few inches off the floor to work properly. Because we couldn't figure this out on blocky we had to switch over to python which took a very long time because the IDE wasn't supported on most of our computers. Fortunately we eventually did get it to download but we had limited time to work on our code, leading to it being spotty and slightly faulty.
Code: Our code is very simplistic. It simply tells the drone to first take-off and hover in the air. It then reverses the throttle and moves down for 3 seconds. Then it creates a variable holding the value of the color it is currently seeing, and while that variable is not "Red", it continually moves and updates the variable, printing out the color it sees and the status of "looking". Once it finds red, it stops, prints out "found", and measures the temperature in that spot before landing.
Results: In the end our drone did work but it was unreliable. It would sometimes fly over the color without detecting it, or not update the variable properly. Unfortunately because of time constraints we were unable to troubleshoot this effectively and ended up with a drone that detected the color around 40% of the time.
If we had had more time we had plans to troubleshoot with the sensor, letting it print out values and moving the drone around colors to see when the sensor updated and changed to implement those concepts into our code.