Page 230 - The Ultimate Palm Robot
P. 230
Color profile: Generic CMYK printer profile
Composite Default screen
Bots /The Ultimate Palm Robot/ Mukhar & Johnson / 222880-6 / Chapter 8
Chapter 8 Taking Control of the BrainStem Robot 213
The first parameter to the load command is the name of the program. This is
followed by the BrainStem ID. Each BrainStem controller has a board identifi-
cation number. This allows a single host to command multiple controllers at the
same time. With multiple BrainStems, each BrainStem is given a different ID,
and the host addresses each controller by its ID. The default ID for the
BrainStem is 2, and since we have not changed the ID, that is the argument we
use in the load command. Finally, each BrainStem has 10 slots, numbered 0 to 9,
in which you can store TEAprograms. The slot number is the final parameter.
Manually Launching Programs
Since the BrainStem has 10 slots, you can store up to 10 programs on the
BrainStem at the same time. In addition, you can have multiple programs run-
ning at the same time. To command the BrainStem to execute one or more pro-
grams, you use the launch command:
launch 2 0
The first parameter is the board ID, and the second is the slot number of the
program to execute. The default board ID for BrainStem controllers is 2. The
slot number can be any number from 0 to 9. If you want to run more programs
at the same time, you would issue another launch command using the slot
numbers of the other programs.
At this point, the robot should begin executing the program. If it detects an
object on one of its sensors, it will move toward that object. If no sensor detects
an object, or more than one sensor detects an object, it will stop moving and
start spinning.
Notice that chase.tea, simple.tea, and each of the other sample programs that
come with the Acroname software has a five-second delay at the start of each
program. This allows you time to disconnect the PPRK from the host and set it
down on the floor. If you program the BrainStem to auto-execute a program, it
also provides time for the BrainStem to finish its initialization sequence before
executing the program. We will see how to do this in the next section.
Auto-launching Programs
While you are experimenting with different programs, you will want the flex-
ibility of having a host computer connected to the robot, and manually
P:\010Comp\Bots\880-6\ch08.vp
Monday, May 12, 2003 1:16:46 PM