PICOBOTZ
PICOBOTZ
© iBOTZ (Ireland) Limited.2004.
No part of this manual may be reproduced with express permission of iBOTZ (Ireland) Limited
.
10
Activity 6: Reacting to Obstacles
In this Activity, you will learn how to program the robot to avoid obstacles.
Click the Measure button
to display the Measure dialog:
Watch the Obstacle Chart and move your hand in front of the robot. The line drawn on the
Obstacle Chart should rise as you bring your hand close to the robot. The robot will "see" the
obstacle when the line drawn on the Obstacle Chart is above the "Obstacle threhold". Click and
drag the mouse on the Obstacle Chart to adjust the Obstacle threshold.
Select the File|New menu command to clear any program that's in the PC's editor.
Use the If and Motors Programming pages to write this program:
Click the Download button to download the program into the robot.
Switch the robot off, unplug the cable and switch the robot on again. Place the robot on the floor
and watch its behaviour. It should move in a straight line until it sees an obstacle. It should then
reverse and turn.
The robot doesn't always react to an obstacle immediately. It waits until the end of the current
"Forward" instruction and sometimes runs into the obstacle. You will learn how to change this
behaviour in the next Activity.
Switch the robot off plug the cable in and switch the robot on again. You are ready for Activity 7.
Activity 7: On-Delay-Off vs. On/Off
In this Activity, you will learn a new way of controlling the motors.
In all the programs you've written so far, the motors have been switched on for a fixed time and
then switched off. The robot then executes the next instruction of the program.