Lesson Modules
Teaching Tips:
- Ask students what they think would be different about controlling a plane instead of a car or boat (Answer: planes also need to move up and down, which a lot of other vehicles can’t do).
- Ask students about a time when they had a problem communicating with someone (Examples of prompts: What happened when you tried to send an emoji to someone older than you? What happened when you tried to talk to someone who spoke a language you didn’t understand?) and then what they did to try to fix it. Explain to students that through coding, students are basically speaking another language and there can sometimes be problems in communication that they need to fix. This is called debugging and usually means going through code and looking for sometimes tiny mistakes.
Teaching Tips:
- Ask students to use pseudocode to explain to a partner how they got their drone to take off, fly forward, and land during the Landing Target Challenge in Snap using both their own words and the appropriate academic language.
Challenge
Challenge: Landing Pad
Create a program so your CoDrone takes off, flies towards a landing pad, and then lands on the landing pad.
Rules:
- The starting place and the landing pad shouldn't change once the challenge has started, but you can change your code after testing it out.
- The CoDrone has to move on its own --- no remote control programs!
If you want to make the challenge more competitive, turn the target into a bullseye and give each section a different point value. The middle of the board should have the highest number of points, and the edges of the board should have the least amount of points.
Teaching Tips:
Customization
If you want to make this mission more creative, we have some ideas!
- A landing pad straight in front of the starting pad
- A landing pad diagonal from the starting pad
- A hoop or tunnel for your CoDrone to fly through to get to the landing pad
- If you have one of our Rokit Smart kits, create a moving landing pad with Rokit Smart!
Sample code
Here's a sample code to get you started! We picked the up key to control our CoDrone, but you can use whatever button you want.
In this code, the CoDrone takes off, and when the up key is pressed and then released, the CoDrone pitches forward. When the up key is pressed and released again, the CoDrone rolls to the right. When the up key is pressed and released one last time, the CoDrone lands.
Important to remember: you need to wait until the key is pressed and then released to move on to the next step! If you only wait for the key to be pressed, your program will move on to the next command so quickly that you won't be able to let go of the key you're pressing in time!
Don't forget to program your kill switch!
Challenge
Activity: Figure eight
Use what you just learned to create a figure eight in the air with your drone!
The only rule: your drone should move in a digital figure eight, so it should be all straight lines with no curves.
Extra Challenge
Reflex Button
Just like the Pin Point mission, the goal of this mission is to take off and land in a specific area. Instead of using timers for this mission, you are going to use one button on your keyboard (you pick which one!) to control your CoDrone.
How to play
1. Setup
- Set up a starting zone and a landing zone. You should take off from the starting zone and land in the landing zone using only one key and, if needed, a kill switch.
2. Begin
- Begin by placing your CoDrone in the starting zone. When you're ready, start your code to have your CoDrone land in the landing zone!
3. Timing
- Keep your finger on the key you're using to control your CoDrone and make sure you time all of your CoDrone's movements so it lands in the landing zone. If that doesn't work, you can always use your kill switch to land.
4. Modify
- Review and modify your code based on how your CoDrone flew, and then repeat all steps until you're successful.
Rules
- If you need to, you can use a kill switch to have your CoDrone land in the landing zone.
- 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!
Teaching Tips:
- Find or make some examples of bad code in Snap and share them on a screen. Next, upload one to your CoDrone and show the students what happens when it tries to fly. Ask students to copy the code into their Snap, fix it, and test it out with their drone.