Page 156 - The Ultimate Palm Robot
P. 156
Color profile: Generic CMYK printer profile
Composite Default screen
Bots /The Ultimate Palm Robot/ Mukhar & Johnson / 222880-6 / Chapter 6
Chapter 6 The Palm Robot Programmer (PRP) 139
NOTE: If you convert your program to TEA, the PRP, will automatically
include three source files for you: aCore.tea, aA2D.tea, and aPPRK.tea. You
need to use Include only for other BrainStem TEA files.
Within Java programs, the Include block is used to tell the Java compiler
which other classes your program uses. Classes are the binary form of Java
code. You tell the compiler which other classes you are using in an import
statement. The Include block is translated into an import statement in Java
source files.
The Servo Start Component This component starts a given servo. Using
properties, you can set the servo number from 0 to 4, the direction of the servo
between forward (1) and backward (–1).
The Servo Stop Component This component stops a given servo. The servo
number is set with a property and can range from 0 to 4.
The Read Sensor Component This component reads a sensor. The pro-
perties are the sensor number (0 to 4) and the variable to store the sensor
reading into.
P:\010Comp\Bots\880-6\ch06.vp
Monday, May 12, 2003 1:06:24 PM