Activity: Fast and precise flying
Use what you learned in this lesson and in the variables lessons to allow your CoDrone to fly at two speeds! Use the remote control to have one key for high speed and another key for low speed.
- Create a variable to keep track of your speed.
- Your CoDrone should be able to fly at two speeds: high (for a drone race) and low (for obstacles or landing on precise targets)
Activity: Low battery landing
Have your CoDrone safely land when the battery is too low!
- Make a code that will land the CoDrone when the battery is less than 20%.
- Crashing does not count as a safe landing!
The goal of the Flappy Drone mission is to fly your CoDrone over and under different obstacles. However, there are some twists!
- You can only control your CoDrone's throttle.
- Your CoDrone is always moving forward.
- When the up arrow is pressed, the drone will fly up, but if it's not pressed, the drone will start to fall.
Don't worry --- you can program a kill switch!
How to play
- Set up a starting zone and a target area. Doorways are great for this!
- Set up some obstacles to fly over and under. Boxes, tables, chairs, and propped up broomsticks are all great obstacles, but get creative!
- Begin by placing your CoDrone in the starting zone. When you're ready, start your code and try to make it to the end without crashing into anything!
- If your CoDrone isn't going up high enough or is going up too much, or if it's barely going forward or going too fast, go back to your code and change the numbers!
- If there are multiple competitors, take turns!
- All parts of the CoDrone that are touching the ground must be within the landing zone for it to count.
- Each competitor gets the same set time to complete the challenge.
- The first competitor to successfully land in the landing zone wins!