Kent NGfL Robolab Project
2000 - 2001
The Police Car
Initially, the children built a buggy of their own which just kept falling apart, no matter what they did to improve the design. However, the car built from the Starter Kit impressed the children so much, that they decided to use this instead. After all, it was a car, it was robust and above all, it already had a blue light on it which they could program to flash! The children came up with this program:
We were all very excited when I discovered that the RCXs can communicate with each other. I explained this to the children, and we decided that it would be a wonderful idea to program the burglar alarm on another group's house to send a message to the police car, so that the police car would then drive up to the house with its siren going and blue light flashing! The program below is entirely the children's own work, with just the mail commands being given, as this was the first time they had been used.
This is the program which was sent to the police car:
It reads: Start program. Clear all mail. Wait for mail. When mail is received, run these two programs at the same time:
1) Play the notes A and C and turn the light attached to port B on for two seconds. Turn the light off. Repeat this sequence indefinately.
2) Turn the motor attached to port A on at full speed for
10 seconds, then stop the motor.
The red traffic light tells the RCX that the program is complete,
but does not stop any of the actions, so that even when the
police car has come to a stop outside the house, the siren
and light will continue to work until the RCX is turned off.
If you are a regular visitor to my site and find the free resources useful, please consider making a donation. All proceeds go towards hosting fees and keeping this not-for-profit website ad free.
Copyright © 2002 to 2011 Diane Hawkins All rights Reserved.
Subscription services are not allowed to link to this site.
Graphics from Printmaster Gold UK Publishing Suite version 7 "The images used herein were obtained from Mindscape's PrintMaster product, (c) 1998 Mindscape, Inc., 88 Rowland Way, Novato, CA 94945 USA. All rights reserved."
~ Site Design by Diane Hawkins ~