Page 222 - The Ultimate Palm Robot
P. 222
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 205
break;
case 2:
aPPRK_Go(-SPEEDL,0,SPEEDL,0);
b=1;
break;
case 4:
aPPRK_Go(SPEEDL,-SPEEDL,0,0);
b=1;
break;
default:
b=0;
break;
}
if (b==0)
{
aPPRK_Go(0,0,0,SPEEDR);
}
else
{
aCore_Sleep(5000);
aPPRK_Go(0,0,0,0);
aCore_Sleep(5000);
}
}
}
chase.tea Line by Line
Let’s spend a few minutes examining the chase.tea program to get an under-
standing of the kinds of things that go into a TEAprogram. The program begins
with four comment lines that start with the following comment:
/* chase.tea */
TEAfollows ANSI C, so the markers /* */ above indicate that what appears
between the markers is a comment and is ignored by the compiler. Within
TEA code you can also use // to indicate comments like this:
//chase.tea
P:\010Comp\Bots\880-6\ch08.vp
Monday, May 12, 2003 1:16:44 PM