Step 12The program, part 4
string_arrays.c:
const char* COMMANDS[] = {"Up", "Down", "Left", "Right", "CClock", "Clock", "Stop", "Pause"};
const char* PROGRAM[] = {"Cover", "Cover and Dock", "Spot Cover", "Mouse", "Figure Eight", "Wimp", "Home", "Tag", "Pachelbel"};
const char* DISCRIPIONS[] = {
"Create attempts to cover an entire room using a combination of behaviors, such as random bounce, wall following, and spiraling.",
"Identical to the Cover demo. But if the Create sees an infrared signal from an iRobot Home Base, it uses that signal to dock with the Home Base and recharge itself.",
"Create covers an area around its starting position by spiraling outward, then inward.",
"Create drives in search of a wall. Once a wall is found, Create drives along the wall, traveling around circumference of the room.",
"Create continuously drives in a figure 8 pattern.",
"Create drives forward when pushed from behind. If Create hits an obstacle while driving, it drives away from the obstacle.",
"Create drives toward an iRobot Virtual Wall as long as the back and sides of the virtual wall receiver are blinded by black electrical tape.",
"Identical to the Home demo, except Create drives into multiple virtual walls by bumping into one, turning around, driving to the next virtual wall, etc.",
"Create plays the notes of Pachelbel's Canon in sequence when cliff sensors are activated.",
"Create plays a note of a chord for each of its four cliff sensors." };
The last file is the Makefile (It's called "Makefile"). This file tells the compiler how to make our program.
CC = m68k-palmos-gccCFLAGS = -O2all: robot.prcrobot.prc: robot bin.stamp build-prc robot.prc "iRobot" iRob robot *.binrobot: robot.o $(CC) $(CFLAGS) -o robot robot.orobot.o: robot.c robot.h $(CC) $(CFLAGS) -c robot.cbin.stamp: robot.rcp robot.h robot.bmp pilrc robot.rcpclean: -rm -f *.[oa] robot *.bin *.stamp
There are also images, I've included them in the source archive. I've opted not to display them individually here because of there number.
To compile this program you need to navigate to the source code directory using the command line. In the directory type "make" (no quotes) and hit enter. The make program will create a bunch of extra files in the source code directory that can be safely removed by entering the command "make clean". Assuming there were no errors, you should have a new robot.prc file that you can install onto your Palm Pilot.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|












































