Drone Simulator: Find the Red Pad with a Sensor
Students start with a program that guesses: take off, fly forward 200, land. It misses the red pad by 179, and the obvious fix, 120, misses too: the drone slides past the distance while it slows down. They replace the guess with a loop that flies a little at a time until the downward camera sees red, and the drone lands on the pad. By the end, they can explain why a guess tuned for one pad misses as soon as the pad moves, and a program that checks a sensor does not.
At a glance
Essential question
When should a program check a sensor instead of following a plan?
Objectives
Students will be able to:
- explain why a program that flies a fixed distance misses a target it cannot see
- build a loop that repeats until a sensor reading is true, using a repeat until loop
- test a program against a goal the app checks, and use the result to change it
- compare a guessing program with a sensing program and say which is better for this task, and why
Vocabulary
sensor, loop, condition, repeat until, algorithm, mission
Standards
1B-AP-08, 2-AP-12, 2-CS-02
Time and materials
45 minutes, grades 6-8.
- One computer or Chromebook per student or pair
- A projector
- The worksheet and exit ticket, one copy each per student
- The rubric, one copy per student if you grade the worksheet
Prep
Make copies of the worksheet and exit ticket. Before class, open mytekdev.com/try/dronesimulator?lesson=find-the-red-pad-with-a-sensor&ref=tpt-drone-2 once on a student computer and press Run, to check that your school's filter allows it and that the 3D view runs on your computers. No account is needed. If you want to see the finished loop first, the answer key shows it.
Assessment
- Formative: the questions under What to look for, asked while students work, and the exit ticket (answer key included).
- Summative: the student's search program and the worksheet, scored with the rubric out of 12.
Technology and privacy
Runs in any browser, Chromebooks included, with nothing to install. The 3D view is drawn by the computer's graphics, so older computers run it more slowly but get the same result. Students need no account and no email: the link works signed out, and nothing they make is stored on our server unless they choose to save it to an account. If your school blocks new sites, ask IT to allow mytekdev.com.
What’s included
- A one-page overview: objectives, essential question, vocabulary, standards and assessment
- A ten-minute walkthrough to rehearse before class, and background in plain words for the teacher
- A 45-minute lesson sequence: warm-up, direct instruction, guided practice, independent practice, closure
- Slides for the board: a PowerPoint file that also opens in Google Slides
- A student worksheet with a QR code
- A 3-question exit ticket, two to a page, with an answer key
- A rubric: 3 criteria, 4 levels, scored out of 12
- Differentiation for English learners, students with IEPs or 504 plans, and students who need more support or more challenge
- Cross-curricular extensions, and notes for teaching it in grades 4-5 and 9-12
- Standards: CSTA 2017
Standards
These CSTA 2017 standards describe comparing algorithms, combining control structures, and using sensors as inputs. Students replace a fixed-distance algorithm with a loop that stops on a sensor reading, and test both.
| Framework | Code | Grades | Standard | How the lesson meets it |
|---|---|---|---|---|
| CSTA 2017 | 1B-AP-08 | 3-5 | Compare and refine multiple algorithms for the same task and determine which is the most appropriate. | Students run a guessing algorithm and a searching algorithm for the same landing, and explain which suits the task. |
| CSTA 2017 | 2-AP-12 | 6-8 | Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals. | Students build a loop whose stopping condition is a sensor reading, and develop it in steps from a fixed-distance guess. |
| CSTA 2017 | 2-CS-02 | 6-8 | Design projects that combine hardware and software components to collect and exchange data. | Students use the drone's downward camera, a simulated sensor, as the input that decides when the program stops. |
Checked October 2026 against: CSTA 2017 progression chart, CSTA 2017 to 2026 crosswalk.