|
Goal: | Count Cars |
Materials: | LEGO DACTA Cities and Transportation
set
or similar LEGO elements Instruction book #2 RoboLab 2.0 or 2.5 Investigator RCX |
Program: | Add 1 to counter each time car passes light sensor. |
Upload: | Data and compare with actual count. |
The LEGO CITY is set up much like the
speed trap in instruction booklet #2. Instead of having many cars
pass in front of the light sensors, one car is continually run around so
that it passes through the photo gates of the light sensors and lamps.
Build
a similar set up using the pictures.
Program the RCX to gather light sensor readings.
Write and run a program to save to add 1 to the red container each time there is a decrease in light sensor reading. |
Pictures of example programs LEGO Links of Linda Hamilton |