Wall Follower

ACTIVITY HEADER

 

 

 

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

Leave a Reply

Switch to our mobile site