Discussion Points

 
Getting Information from a Touch Sensor

Whole Class Activity  

Before students build Roverbot: Remind students of the problem they solved last: having M. Pathfinder move towards a wall, hit it, and go backwards. Ask students whether or not they think M. Pathfinder had a way of telling if it hit something. Explain that it really didnít matter that there was a wall at the end of its trip forward; it was basically programmed to move forward for a certain amount of time.

Beyond the Basics

Show the class the touch sensor. Explain that in order to tell when itís pressed, a robot must have a way to get that information. A touch sensor, with its pushbutton, can send a signal to the RCX each time there is a change in its stateóif itís pressed after it has been released; if itís released after being pressed; or if itís pressed and immediately released (clicked).

Connect the touch sensor to a long connector wire and attach it to an M. Pathfinder. Tell the students that you have connected a touch sensor to M. Pathfinder and that you want it to stop when you press the touch sensor, which would be similar to the touch sensor being pressed against another object such as the wall. Run it on Program 1. Press the touch sensor. (It wonít stop.) Ask the students why they think it wonít stop. Point out that the touch sensor is in good working order, as shown on the display window when you view input from the touch sensor. When itís pressed, the display reads 1; when released, it reads 0. 

It is important that students understand that it is not enough to add a touch sensor. The program has to have a block that reads information from the touch sensor and then makes a decision about what to do based on this information (e.g., If itís pressed, turn motors off).

Tell students that it is better to work with a sturdier vehicle when attaching sensors. (It is easier to connect sensor attachments to a sturdy construction.) Explain that theyíll be building Roverbot, adding touch sensors, and programming it to accept touch input.

Return to Top

Part 2: Building and Programming Roverbot

Small Group Activity

Building Roverbot : Have students work in small groups, following Constructopedia building instructions, pages 12-17. Give each student a copy of the activity sheet. As they build, talk to students in their groups, showing them the touch sensor and how it should be connected to the connector wire. Point to the 4 wired studs on the sensor and explain that the connector wire must be connected on top of these studs. Explain that, unlike motors, sensors are connected to input ports, marked 1, 2 or 3.

Have students follow the Working with Touch Sensors activity sheet, attaching a touch sensor to their Roverbot and programming it to receive touch information. As they work in small groups, make sure students understand the problem they are trying to solve: causing Roverbot to change its behavior in response to input from a touch sensor.

The following Programming Highlights explain the programming ideas that students will need to master in order to solve this problem. They also note potential confusion points, with suggestions for what you can do to help your students work through them.

 

Return to Top