Rover Rescue: Code a Bit Board Rover

← Free Lesson Plans for Teachers

Free Lesson Plan

Grade 6Engineering & Coding3 sessions x 45 min (or 4 sessions if students assemble the 207-part rover in class)micro:bitBit Board2-AP-132-AP-17

⬇ Download PDF (lesson, student sheets & answer key)

Driving question: How can breaking a big mission into smaller parts help us program a rover?

Overview

A four-wheeled lunar rover vehicle
The Lunar Roving Vehicle used on the Moon by Apollo 15 astronauts in 1971. Photo: NASA Johnson Space Center, Public domain, via Wikimedia Commons.

Students build (or start with a pre-built) brick-based rover driven by a micro:bit and continuous-rotation servos. They decompose a "rescue mission" (drive to a stranded figure, turn, return to base) into smaller functions such as forward(distance), turn_left, and stop, then calibrate, test, and refine each part.

Teams try the program from several setups (different start positions and floor surfaces) and improve it before the final mission run.

Standards

CodeStandard
CSTA 2-AP-13 (2017)breaking a program into parts
CSTA 2-AP-17 (2017)trying a program from several setups and improving it

CSTA K-12 CS Standards (2017), Level 2 (grades 6-8). This lesson has not been reviewed or endorsed by CSTA.

Learning Objectives

Students will:

  • decompose a mission into subproblems and functions.
  • calibrate rover movements using measurements.
  • test and refine a program using several test cases.

Materials

Geyer resources for this lesson

  • Bit Board Rover Single
    207 brick-compatible parts plus servos, 2 AA battery holder, and Bit Board for a rover or tank (micro:bit and 2 AA batteries sold separately).
  • Bit Board Rover 5 Pack
    Class option (1 pack for 15-25 students in teams of 3-5).
  • Rover Remote Add-On
    Optional thumbstick remote for a manual-driving comparison (requires a second micro:bit, 2 AAA batteries, and a small Phillips-head screwdriver).
  • 33' / 10 M Wind Up Tape
    Measure the mission course (1-2 per class).

Also needed

  • micro:bit boards with USB cables (1 per rover, plus 1 extra per optional Remote Add-On)
  • 2 AA batteries per rover (plus 2 AAA batteries and a small Phillips-head screwdriver per optional Remote Add-On)
  • Computers with MakeCode (1 per team)
  • Masking tape for the course; small toy figures (1 per team)
  • Student Sheets 1 and 2 (1 each per student)

Vocabulary

WordWhat it means
decomposeBreak a problem into smaller parts.
functionA named block of code that does one job and can be reused.
parameterA value you give a function, such as a distance.
calibrateAdjust using measurements so results are accurate.
test caseA specific situation used to check a program.
continuous servoA motor that spins all the way around; speed and direction are set by code.

Safety Notes

  • Run rovers on the floor or a low table with edges taped; catch rovers before they fall.
  • Unplug batteries before changing wiring.

Before You Teach

  • Plan to pre-build the 207-part rover chassis before class or allow an extra class session for assembly.
  • Test basic servo code on one rover. For continuous servos, a value near 90 stops the motor, and values toward 0 or 180 spin it faster in opposite directions; calibrate the exact stop value for your servos.
  • Tape a mission course: base, a 1 m straight, a 90-degree turn, a figure 50 cm further, and a marked "safe zone" beside it.

Warm-Up (5 min)

  • Give directions to walk to the door. Then ask: "Which steps repeat? What would you name them?"

Procedure

Build (40 min)

  1. Teams build the rover body from the kit guide (or check a pre-built rover) and connect the servos and 2 AA battery holder to the Bit Board.

Decompose and calibrate (45 min, Session 2)

  1. On Student Sheet 1, break the mission into subproblems and name functions.
  2. Calibrate: run forward for 1 second and measure distance; repeat 3 times and find cm per second. Calibrate a 90-degree turn time.
  3. Write functions forward(cm) and turn_left / turn_right using the calibration.

Test and refine (25 min, Session 3)

  1. Run the three test cases on Student Sheet 2 (different start positions and surfaces). Record misses and refine code.

Mission run (20 min)

  1. Final mission: drive to the figure, push it into the "safe zone," and return. Reflect on how decomposition helped.

Differentiation

SupportOn-levelChallenge
• Provide the forward function; students write turns.
• Use the remote for one leg of the mission.
• Shorter course.
• Complete the procedure and student sheets as written.• Add a distance sensor to stop before obstacles.
• Write a function that takes angle as a parameter.
• Make the mission work on two surfaces without editing code.

Assessment

  • Are subproblems clearly named?
  • Is calibration data recorded and used?
  • Are test results documented with changes?

Exit ticket: "Name two functions you created and explain how they made the mission easier to program and fix."

CriterionBeginningDevelopingProficient
DecompositionNo subproblemsSome subproblemsClear functions for each subproblem
CalibrationGuessingMeasured onceRepeated measurements used in code
Testing and refiningOne testTests without changesAll test cases run and code refined

Extensions

  • Compare coded driving with remote driving for accuracy.
  • Program a line-following behavior.
  • Write a user guide for your functions.

Student Sheets

Use these sheets in class, or download the PDF for a print-ready layout.

Student Sheet 1

Decompose the Mission

Print-ready version in the PDF.

Name: ______________________________   Date: ______________

SubproblemFunction nameParameters
Drive straight a set distanceforwardcm
CalibrationTrial 1Trial 2Trial 3Average
Distance in 1 s (cm)
Time for 90-degree turn (ms)

Student Sheet 2

Test Cases

Print-ready version in the PDF.

Name: ______________________________   Date: ______________

Test caseExpectedActualChange made
Start on base, smooth floorReach figure within 5 cm
Start 10 cm left of baseReach figure within 10 cm
Carpet or textured matReach figure within 10 cm

How did decomposing the mission help you find and fix bugs?

Show answer key (for teachers)

Answer Key & Teacher Notes

Look-fors

  • Sample decomposition: forward(100), turn_left(), forward(50), push(), turn_around(), forward(50), turn_right(), forward(100), stop().
  • Calibration example: 18, 19, 17 cm in 1 s -> 18 cm/s, so forward(100) runs about 5.6 s.
  • Surfaces change speed, so a robust solution re-calibrates or uses a parameter for surface.
  • Exit ticket: functions let teams test each move separately and fix one function without rewriting the mission.

Need a print-ready copy? The PDF includes the lesson, student sheets, and answer key.

Download the PDF  |  All free lesson plans

Free for classroom use. You may print and copy this lesson for your students. © Geyer Instructional Products. Standards text: CSTA K-12 CS Standards © CSTA. Photo: NASA Johnson Space Center, Public domain, via Wikimedia Commons.