Page 208 - The Ultimate Palm Robot
P. 208
Color profile: Generic CMYK printer profile
Composite Default screen
Bots /The Ultimate Palm Robot/ Mukhar & Johnson / 222880-6 / Chapter 7
Chapter 7 Essential Robot Programming Strategies 191
Loading and Running Hello World
Start by creating the program as a memo on your Palm OS device. Alternately,
you can create it as a memo in the Palm Desktop or a note in Outlook, and per-
form a hot sync operation to load the memo to the PDA.
After you have created the memo, launch PocketC on the PDA. Tap the
Compile button to go to the compile screen. You will see a list of memos that
contain programs; unless you’ve already entered other programs, this list will
only show the Hello World program. Select the program and tap the Compile
button to compile the program. If the program has an error, PocketC will dis-
play a dialog box telling you which line has a problem. When the program
successfully compiles, PocketC will automatically return to the main screen.
Select the compiled program and tap the Execute button to run the program.
PPRK Programming with PocketC
It’s time to revisit the Simple Jig program again, this time using PocketC. If
you don’t want to type all this into a memo, we’ve included the source code in
the \Other Applications\SimpleJig directory on the CD-ROM.
//SimpleJig.c
char cmd11[6] = {'S','V','1','M','1'};
char cmd1128[8] = {'S','V','1','M','1','2','8'};
char cmd1255[8] = {'S','V','1','M','2','5','5'};
char cmd21[6] = {'S','V','2','M','1'};
char cmd2128[8] = {'S','V','2','M','1','2','8'};
char cmd2255[8] = {'S','V','2','M','2','5','5'};
char cmd31[6] = {'S','V','3','M','1'};
char cmd3128[8] = {'S','V','3','M','1','2','8'};
char cmd3255[8] = {'S','V','3','M','2','5','5'};
char range[10];
int rv;
initCmds() {
cmd11[5] = (char)13;
cmd1128[7] = (char)13;
P:\010Comp\Bots\880-6\ch07.vp
Monday, May 12, 2003 4:29:28 PM