Instruction Guide: Move until Near

Printer-friendly version

In this lesson students explore the use of the ultrasonic sensor.

Have students work through the "Move Until Near" lesson on the "Behaviors" page in "NXT Video Trainer 2.0".

Students should be able to answer all the review questions at the end of each step and end up with a solid command of each parameter in the Wait-until-Ultrasonic sensor block configuration panel and an understanding of how the ultrasonic sensors works.

As students progress through, have them document their milestones in the Move Until Near Task Assignment Sheet.

Walled Maze Challenge.

This page contains a copy of this challenge from "NXT Video Trainer 2.0."

Key learning to check for during sign-off includes:

  • Ensure students have a basic understanding of the physics behind the ultrasonic sensor's operation:
    • Use the animation in Step 7 of NXT Video Trainer 2.0 if desired
      • Ensure students understand ultrasonic means sound waves above the human-audible range
      • But, they are still sound waves and behave as such:
        • They bounce of hard surfaces
        • They can be partially absorbed by soft surfaces
        • They bounce differently off of flat vs round vs angled surfaces
        • They can interfere with each other
      • Comparison to a bat's echo-location connects with some students
  • Have the students explain their choice of hardware design (how/where the ultrasonic sensor was attached/positioned)
    • If your maze walls are relatively short (made of 2x4's, or shorter) the prescribed ultrasonic sensor attachment may be too high for optimal performance.
  • Revisit the concept of a threshold.
    • With the light sensor, a threshold is usually calculated from a measured "light" and "dark" value
    • With the ultrasonic sensor, a threshold is usually set based on some design constraint or desired outcome
    • Ensure students can distinguish between these two and explain the difference
      • Use the animation in Step 8 of NXT Video Trainer 2 if desired
    • Have students explain their program
      • Start with their flow chart/pseudocode to get an overall view of the program
      • Use the NXT-G program to show how each block in the flow chart was implemented
      • Ensure the understand the the parameters in the wait-until-ultrasonic sensor block
      • Ask how the Wait and Move block parameters were determined
      • Encourage the use of comments in their program - at a minimum, the block labels in the flow chart or pseudocode mom-speak should appear as comments in NXT-G

Captain's Buried Treasure, Part 2

This challenge involves use of the light, touch and ultrasound sensors (you can decide if you wish to allow the students to also use the sound sensor for "voice" navigation). This is what to check for:

  • Be sure students break this task into behaviors and create a flow chart/pseudocode to manage all the behaviors
  • Students should not use dead-reckoning for all aspects of this challenge:
    • Light sensor should be used to detect and avoid the waterfall, etc.
    • Touch sensor should be used to detect the tree
    • Ultrasound sensor should be used to navigate the secret passage
  • When reviewing their programming:
    • Start with their flow char/pseudocodet to get an overall view of the program
    • Use the NXT-G program to show how each block was implemented (including comments that identify the flow chart blocks/pseudocode mom-speak)
    • Ask about the program development process - did they use the incremental approach recommended here
      • What other "Best Practices" would they recommend for program developmen