Discussion Points

 
 
Getting Information from a Light Sensor

Whole Class Activity

 

Before students build a light sensor attachment: There are several ways to motivate a discussion about light sensors and the kind of problems they help solve. In the following section of the whole class discussion we outline three possible ways to get started.

 

  1. For this example, you will need to download the program Linetracker. Show the class the sheet printed with a black track that is in your Mindstorms™ kit. Place Roverbot on the track and run it, using the Linetracker program. Encourage students to describe its behavior as Roverbot moves along the track. Ask the students how they think Roverbot is following the line. It is likely that students will notice that Roverbot is jiggling rather than moving in a straight line. To help them focus on which motor is turned on, remove Roverbot from the track and place it on a clear, white area (You can use the reverse side of the sheet or have some white posterboard within reach). Students will see that it’s turning in one direction. Move it to a plain darker area (e.g., the floor or a black posterboard) and it will turn in the opposite direction. If needed, remind students of programs they wrote to have Roverbot turn. This hint usually helps students realize that Roverbot is programmed to turn one way on dark and the other way on light. The question then becomes how Roverbot gets light information. If you choose to start with this example, be sure to download the program Linetracker onto your Roverbot and test it in your room before you demonstrate it.

  2. For this example, you will need to download the program StopNow. Place a white posterboard adjacent to a black posterboard. Then place Roverbot on the far end of the white posterboard. Remind the student of the problems they solved previously, having Roverbot with a single bumper move toward a wall, hit it, and then stop. Tell them that instead of a wall, you now have a light area followed by a dark area. Your problem is to have Roverbot move on the white board and stop when it gets to the black posterboard. It will be obvious to the students that a touch sensor could not gather that information. The question then becomes how Roverbot gets information about light and dark areas. If you choose to start this way, download the program StopNow onto your Roverbot and test it in your room before you use it for demonstration.

  3. For this example, you will need to download the StopShine program. Connect a light sensor to a long connector wire and attach it to port 1 of your Roverbot. Remind students of a program they wrote for the touch sensor, telling Roverbot to stop moving when the sensor is pressed. Now, run Roverbot using the StopShine program. Flash a light at the light sensor. Roverbot will stop.

Following whichever example you chose to introduce the need for a light sensor, show the class the light sensor. Explain that in order to tell changes in light (i.e., moving from a dark area to a lighter area; having a light shined at it) a robot must have a way of getting that information. A light sensor gets light information from the environment and converts it to percents. Therefore, the range is between 0 and 100.

Return to Top

 

Programming with Light Input

Small Group Activity

 

 

Taking light sensor measurements: Have students work in small groups, following the Lighten Up!  worksheet. Give each group the Reflection Stands and a flashlight. Students are instructed first to configure a port for the light sensor and then to get light measurements. The most important point here is for students to realize that light readings from surfaces change when the surface changes or when the light conditions change. Dark surfaces reflect less of the light that hits them than lighter surfaces.

 

When students have finished the reflection activity, have them move on to solve the problem of having Roverbot move about on the floor and stop when it reaches a white piece of paper laid on the floor. Students will first build a light sensor attachment, following building instructions on page 34-35 of the Constructopedia, then work on solving the problem. Since they already have some experience programming with Wait Until or with a Sensor Watcher, allow them enough time to try solving the problem on their own.

 

When students have had enough time to work on some of the problems, we recommend having a class discussion, comparing the Table Bumper, Touch and Go activity, and the light sensor. Use Transparency 6 to help guide the discussion. Remind the students of the problem—Roverbot should move on the table and stop at the edge—and show that it can be solved with a touch sensor or a light sensor. Point out that the kind of information coming in through the sensors is different, but the resulting behavior is the same. Students will be able to see that programs are similar in structure, only one has a light sensor watcher with defined ranges and the other has a touch sensor watcher with press and release states.

Return to Top