Tutorial Guide
35
Lesson 4 Intermediate Course
Making boxes
In this lesson, you will make and edit 3 boxes as follows.
1 Add a command to the Stand box for initializing the sensors
2 Make a branch box for the branch condition “if the head was
pressed/if the head was not pressed.”
3 Make a box for the “wait for 1 second” command (for obtaining
sensory information)
1 Add a command for initializing the sensors
Add a command to the Stand action box for initializing the sensors.
1 Click the line between the STAND and
WALK_BOW box, and delete it with the Delete
key.
A dialog box asking “Delete immediately?” appears. Click
Yes.
2 Double-click the STAND action box.
3 Add a command for initializing paw and head
sensors, and then close the Properties box.
Main Variable Var/Value
SET Head_ON* 0**
If a sensor parameter is set to “1”
(the presence of sensory
information means the sensor has
been touched), it will maintain this
value. For this reason, the sensor
parameter must be restored to
“0”when making a program that
loops or when the sensor was
previously used by another box.
Restoring the sensor parameter to
“0” is referred to as
“initialization.”
Add a command after the STAND
action box to initialize the value of
the head sensor.
Adding a command that assigns a
value of 0 to the “HEAD_ON”
parameter causes the the head
touch sensor to be initialized.
* The AIBO’s head sensor is
referred to differently according
to the model. It is the Head
sensor on ERS-210, the Head
touch sensor on ERS-220 and the
Head switch on the ERS-310
series.
The parameter name for all of the
above models is “Head_ON.”
**Head sensor parameter
1: It was touched
0: It was not touched