Page 162 - The Ultimate Palm Robot
P. 162
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) 145
The version of the PRP provided with this book allows you to
translate code into BASIC, TEA, or Java. You can use BASIC code
with the Pontech SV203 controller. You will use TEA and Java with
the BrainStem controller. Want other options? You’ll have to be really,
really nice to Kevin, because he slaved over this program for months.
2. After choosing the language for the source code, the PRP will
translate the program into source code. This happens relatively
quickly, and when it’s complete, the program will display a dialog
telling you where it saved the file.
3. You will see a dialog box if the conversion fails.
NOTE: If the conversion fails, it is probably because there is an error in your
program. You will need to check your program for correctness. Check that all
End blocks (If, For, and so on) have a matching beginning block. In other
words, ensure each If has a matching EndIf. Do the same for all the blocks that
have a matching End block.
4. After the source file is created, you may need to transfer it to a PDA
or to the controller, so that it can be executed.
Loading Source Code to the Host
After you have successfully converted your program to source code, you are
ready to transfer it to a host for use with the robot. The host you use depends
on how you constructed your robot and what interface cables you used.
The host for the PPRK using the Pontech SV203 controller will be a Palm OS
device such as a Palm III, Palm V, or Handspring Visor. The host for the PPRK
using the BrainStem controller can be one of the Palm OS devices, but it can
also be a PC connected directly to the robot.
Basic
The BASIC code created by the PRP is tailored for the HotPaw Basic inter-
preter. This interpreter was introduced in Chapter 5. HotPaw Basic is an in-
terpreter for BASIC source code for your Palm device. The interpreter runs as
P:\010Comp\Bots\880-6\ch06.vp
Monday, May 12, 2003 1:06:26 PM