![iBOTZ PICOBOTZ Manual Download Page 14](http://html.mh-extra.com/html/ibotz/picobotz/picobotz_manual_609277014.webp)
PICOBOTZ
PICOBOTZ
© iBOTZ (Ireland) Limited.2004.
No part of this manual may be reproduced with express permission of iBOTZ (Ireland) Limited
.
14
Repeat 4 times
<instructions>
Repeat 6 times
Repeat 2 times
<instructions>
End
<instructions>
Repeat 2 times
<instructions>
End
End
End
Is legal - the Repeat-End blocks are nested to a maximum of three deep.
There is a second form of the Repeat instruction. Click on the "Repeat Until" radiobutton.
The lower part of the Repeat Programming page has instructions for Repeat loops which repeat
until a condition becomes true.
On the Motors Programming page, select the On/Off Motor Mode.
Edit the program so it looks like this:
Download and run the program. The robot moves forwards until it sees an obstacle then spins
right until the obstacle has gone. It then delays a little longer (while spinning) so that is definitely
not pointing at the obstacle.
A Repeat-Until loop differs from a While loop. In a Repeat-Until loop, the test is done at the end
so the instructions inside the loop are always executed at least once. In a While loop, the test is
done at the beginning so the instructions inside the loop might never be executed.
Switch the robot off plug the cable in and switch the robot on again. You are ready for Activity 10.
Activity 10: Events
In this Activity, you will learn about Events: a different way of reacting to sensors.
Click the Event button to select the Event Programming page: