Drone Simulator: Find the Red Pad with a Sensor

Grades 6-8 · 45 minutes · Computer science, Engineering

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

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.

FrameworkCodeGradesStandardHow the lesson meets it
CSTA 20171B-AP-083-5Compare 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 20172-AP-126-8Design 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 20172-CS-026-8Design 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.

Get it on Teachers Pay Teachers ($6.00)