PICOBOTZ
PICOBOTZ
© iBOTZ (Ireland) Limited.2004.
No part of this manual may be reproduced with express permission of iBOTZ (Ireland) Limited
.
15
Click on the "Obstacle" Event button. A new programming window will appear. Create programs
in both the "Main" program window and the "Obstacle" event program window like this:
(You can drag the dividers between the panels to simplify editing.)
On the Motors Programming page, select the On-del-off Motor Mode.
Download and run the program. The robot will move forward. If it hears a handclap, it will spin
right. If it detects an obstacle, the Main program will stop running and the Obstacle Event
program will be run once. The Main program will then start running again from the beginning.
The Obstacle Event program will be run immediately that an obstacle is detected - even while the
Main program is waiting for the motors. The "If Short Noise" instruction is only executed when the
Forward instruction has finished.
Activity 11: Multiple Events
In this activity you will learn about programs which react to more than one Event.
Edit the program so that the instructions for a Short Noise are also run in an Event:
Download and run the program. The robot will behave as before but now, when it hears a
handclap, it reacts immediately.
Switch the robot off plug the cable in and switch the robot on again. Support the robot on a small
book so that the wheels are off the ground. Click the Run button.
The highlight in the editor moves to show which instruction is being executed. If you clap your