PrimitiveNav ------------ This program is concerned with navigating over a plane with a track that contrasts with the background, mimicking a maze, and with a "finishing" marker. It is highly dependent on manual error-correction. The robot --------- Two motors: - Each with a a small wheel - Port A and port C each power one motor Three light sensors: - Port 2: one between the motors, with the LEDs in line with the axles. - Ports 1 and 3: one on either side, outside of the wheels, approximately one thick lego behind the axle line. Weight balance: The brick is positioned as far toward the wheels as possible, with a drag button positioned to keep the chasis nearly horizontal. The environment --------------- A tape track of about 3/4" width is stuck to a smooth surface. All lengths of tape are positioned orthogonally. No segments of tape that do not meet should be further apart than the distance from the middle sensor to the outer sensors, or about 4". User directions --------------- At various points, the RCX prompts the user for attention. The first task for the user is to input the readings for the environment. When the RCX prints "P", the user must place the sensors over the background paper and press the Program button once for each sensor. The numbers are a percentage of light that the sensors see. Next, the RCX prints a dismembered "T". The user must place the left sensor over the track and press View. Then, the user should move the middle sensor over the track and press View, then do the same for the last sensor. The final round of this requires the user to place the sensors over the material that signifies that it has completed the course, and press Program three times. Press RUN to begin. "New" indicates that it is travelling forward. From here after, RUN will step the robot ahead. When it comes to an intersection and stops, make sure that it is correctly placed on the intersection. The LCD will indicate that it has stopped. If it has run off course, put it back on track. Next, it will go through a sequence that enters the sensor values, beginning with "array" and ending with "arr 2" followed by an integer. Loose integers indicate color, with "0" being paper, "1" being track, and "3" being the finish color. All the user needs to do is press RUN during this long segment. If the RCX does not recognize the color it sees, it will indicate that it thinks it is blind and exit. Now it determines which ways it can go, and prints "route". If it sees nothing ahead, it will print for a dead end, then "again", and move backward. Then it waits until it hits another intersection. If it sees one or more options, it will print "yes". Then it will "choos" a direction, first informing the user of what random starting number it has generated, and then in what direction it intends to go. Then, it will indicate that it will "turn" toward whatever direction it wants to go. The subsequent number confirms which way it was supposed to have gone. It is incumbent on the user to assure that its new direction matches the one it has attempted. A "0" means left, "1" means straight ahead, and "2" means right. "end" signifies that it has completed one round and will move forward again. When it has found the finishing material, it will wait for the user to press RUN before exiting.