Instruction Guide: Move until Dark

Printer-friendly version

Have students work through the self-paced lesson "Move until Dark"  from 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-for-Light block configuration panel, including the calculation and use of a light threshold.

As students progress through, have them document their milestones in the Move Until Dark Task Assignment sheet.  Note, this sheet has students skip the challenge in Step 10 of the video lesson and instead tackle the "Line Counting" challenge.

Line Counting

The "Line Counting" exercise requires students to use the Sound block and Display block in order to audibly count the lines and smile upon completion. Try to have students intuit out how to use these blocks and all their configuration options, but if they get stuck they may use:

  • NXT-G help files (magnifying glass in lower right corner of NXT-G window)
  • "Trouble Shooting - Play a Sound" lesson  on the" Challenges" page in NVT2.
  • "Display to Screen" lesson on the" Challenges" page in NVT2.

If students are avoiding using the light sensor and relying on fixed duration Move blocks, lay out the challenge with varying line spacing and require the solution to work in both directions:

  • This will require students to use the light sensor to detect the lines
  • A classic issue you are likely to see is that students using the light sensor will have their robot move forward to the first line, stop, count "1" and then stay on the first line and count "2,3,4"  This is due to the nature of the Move-unlimited block preceding the the Wait-for-Light block.  It is important the students understand the Move-unlimited block only takes a few milliseconds to run, and then proceeds to the next block in the program.  So, if the robot is already sitting on a black line, the next Wait-for-Light may run before the robot moves off the first black line.

To increase the level of the challenge, make one or more lines much thick than the others:

  • If students are relying on a fixed duration Move block to get off the line in order to solve the above Move-unlimited issues, varying line thickness will make this solution inadequate.
  • If students instead use the light sensor to detect when they are off the line, then line thickness will not impact their solution.

Students may also struggle with the "4 for 5 seconds" at the end of the program. 

  • Students may insert several Sound blocks to attempt to meet this requirement - but this will not result in a precise 5 seconds.
  • If student select the repeat parameter in a Sound block at the end of the program, the robot may appear not to say anything. This is because, like a Move-unlimited, a repeating Sound block only takes milliseconds to run and then proceed to the next block in the program - which in this case is the end of the program, so the sound stop.  In order to here the "4" repeat for 5 seconds, a Wait-for-Time=5s block must be inserted after the repeating Sound block.

The teacher has the final sign-off on this sheet. Key learning to check for during your sign-off includes:

Understanding the concept of a threshold

Calculating a light sensor threshold

  • You may want to provide additional examples during your sign-off to ensure student mastery

Understanding each parameter in the Wait-for-Light block

  • Particularly the "Until" section (how to set the threshold) and the "Function" (using the sensor's LED light: When and Why?)
    • Generate Light (or reflected Light mode) should be used when the sensor is close to a surface
    • Ambient Light mode (no Generated Light) should be used when sensing the light in the surrounding environment
    • If uncertain, trying both ambient/reflected in View mode and selecting the one that gives the largest difference between light and dark readings for the required conditions always works

Understanding their program

  • Ensure each team member can explain the program
  • How did they solve the counting aloud, line width and repeating sound at end requirements
  • Good use of comments in program