Tutorial Guide

38
Lesson 4 Intermediate Course
Connecting the boxes to loop the
program
By connecting the boxes in a loop, you can make the program one
continuous motion.
1 Check the head sensor for input every second
1 Set the mouse to link mode, and then connect
the STAND and TOUCH_HEAD? boxes.
2 Connect the lines to make a loop as follows:
1 Connect the free terminal of the TOUCH_HEAD? box to the
input terminal of the WAIT_1SEC box.
2 Connect the output terminal of the WAIT_1SEC box to the
input terminal of the TOUCH_HEAD? box.
The WAIT_1SEC action box loops and checks the input to the
head sensor every second when AIBO has not received any
input.
If the mouse is in normal mode,
you can also connect the boxes by
clicking and dragging the mouse
while pressing the shift key.
When connecting the branch box
to the box that is the jump
destination, confirm the condition
of the terminals before connecting
the box to the correct destination
box. The branch condition is
displayed when you place the
mouse on the terminals.
By connecting the empty terminal
(ELSE) to WAIT_1SEC, youve set
the following condition:
If the head was not pressed t
Wait for 1 second (jump to the
WAIT_1SEC box).
Checks for input to the
head sensor every
second.