Wall Follower





Name of Activity Wall Follower
Author Jay Clark
Keywords NXTs, car, wall, distance, loops, conditional loops, sensor, threshold
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 1 Hour Total
Brief Description Students will program their NXT cars to follow the outer edge of the classroom by driving along the wall at a set distance away.
Lesson Objectives: Programming using loops and conditional loops
Determining and Implementing sensor thresholds
Materials Needed: Prebuilt NXT car with a sound sensor
Clear wall space
Computers with NXT Mindstorms software
Preparation and Set Up: Find a section of the room that has the most dynamic wall. -Maybe the wall juts out for a closet and back in again afterwards-

Clear this space for cars to run next to.

For any inside turns (turning to the right if the wall is on your left), place a strip of black tape a foot or so away from the wall for the extensions.

Necessary Background A wall follower activity is very similar to the line follower programmatically. Start close to the wall. Turn away from the wall until the distance sensor reads that you are too far, then drive back towards the wall until the distance sensor reads that you are too close. Loop.

There is a challenge in trying to get the car to make an outside turn. This involves playing with the distance away from the wall you set your car to follow, and how dramatically you have the car steer.

Inside turns cannot be made using the loop. Some other sensor must tell the car that an inside turn is approaching, and then the car must react by turning. Students may use a touch sensor, a light sensor, a sound sensor, or even another distance sensor (if they have one)

Vocabulary: Threshold – The sensor value that when breached, will trigger a wait for block or a conditional loop. (Some students have had a better time understanding it as a “benchmark”)

Procedure Introduction – 10 minutes Introduce/ Review loops with the students and why they are useful in programs.

  • Loops allow us to repeat a set of commands that would otherwise be tedious to program over and over.

Introduce the activity, and ask the students if they have an idea of what the program should look like. Activity – 40 minutes Allow students to make the mistake of not including any turns in their program. They will understand their mistake when trying to make the first outside turn. Clean up/ Wrap up – 10 minutes

  • What was easiest? What was hardest?
  •  What would you have done differently?
  •  What were some good ideas you saw that other groups came up with?
Extensions: In order to make inside turns, students will have to use a conditional loop and another sensor to warn them of the upcoming turn.
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/c1.jpg
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/d.png

Digital Measuring Wheel





Name of Activity Digital Measuring Wheel
Author STOMP
Keywords NXT, rotation, sensor, measurement, accuracy, diameter, circumference, pi, distance, conversion
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 1 Hour Total
Brief Description Use an NXT and a rotation sensor to buld a digital measuring wheel. The device can be
pushed by hand on the ground or at a distance using a handle. Check the device’s
accuracy with a measuring tape.
Lesson Objectives: - To learn about programming in NXT MINDSTORMS.
- To use measurements and math in programming to collect data.
Materials Needed: NXT brick
NXT motor w/built in rotation sensor
LEGO wheel and axle
Computers running NXT-G MINSTORMS software.
USB cords to connect NXT bricks to computers
Data collection sheet
Preparation and Set Up:
- Arrange students in groups of two.

- Distribute necessary materials.
- Distribute a data collection sheet.

Necessary Background Measuring wheels are used in many places to find the distance of a line. The number of
rotations can be translated to distance if the circumference of the wheel is known.
The circumference can be found by measuring around a wheel or by multiplying the
diameter by pi.


  1. Have students build a measuring wheel device. Attach a wheel with an axle to a motor. Wire the motor to the NXT brick, but do not attach the motor to the NXT brick.
  2. Have students measure the wheel’s circumference to use when calculating distance.
    1. Option: You may also have the students find the circumference by measuring the diameter and multiplying the diameter by pi.
    2. Option: You may also discuss radius by having students multiply the radius by 2 x pi to get teh circumference
    3. Option: Have students find the circumference all three ways and compare answers.
  3. Have students program the NXT brick to display the distance traveled by doing the following:
    1. Divide the rotation degrees value by 360 to get the number of rotations traveled (or have the rotation sensor count in rotations) using the “Math” Block.
    2. Multiply that value by the circumference to get a distance value by using the “Math” block.
    3. Convert this distance value to a text value using a “Number to Text” block.
    4. Display the text value on the NXT screen using a “Display” block.
    5. You will need to enclose the program in a loop so that it is continuously displaying measurement data
  4. Check the accuracy of the device with a tape measure by having students measure the length of different lines.
  5. Discuss, as a class, reasons that the measurement may not be accurate. Does this always matter? How could you make the measurement more accurate?
  6. Discuss the different variables in this experiment.
    1. The independent variable is the number of rotations.
    2. The dependent variable is the measurement shown on the screen.
    3. Discuss as a class the relationship between these two variables.
    4. Option: draw a line graph of rotations v. acutal measurement (inches, cm, meters, etc.) that the NXT brick displays.
  7. Discuss where a measuring wheel might be useful and where it is not useful. What other tools can be used to measure distance?
Extensions or Modifications: Add a touch sensor to clear data to take a new measurement.
Use a touch sensor to trigger when measurements are displayed.
Add sound feedback when certain distances are reached.
Convert the device to a wench that measures the length of a string wrapped
around it
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/58_image_2_tet.png
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/58_image_3.jpg
Reference 3 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Digital-Measuring-Wheel.pdf
Reference 4 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Engineering_Design_Process.doc
Reference 5 http://sites.tufts.edu/stompactivitydatabase/files/formidable/measure_worksheet.doc
Reference 6 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Measuring_wheel.doc

Switch to our mobile site