Final project
Responding to commands



For this final project, two infrared sensors were attached to the touch sensor on the front of the robot. These sensors are similar to the photoresistors used for following the line on the board, but return more accurate readings. Their purpose is to make the robot able to receive signals that it can then act upon.

These signals were to be received from colored blocks found on the path of the robot as it moved through the maze. After finding one of these blocks, the wheels would be powered down and a reading of the color present on the blocks would be obtained. The robot would then interpret the color as a command. There were three different signals the robot was programmed to understand:

This time, the robot moves randomly through the maze, and it does not stop at the ramp, even if it eventually happens to arrive at it. Only when it has been so commanded, at any point in its trajectory, the robot seeks the center of the ramp and stops there. Otherwise, it just moves throughout the ramp, using the walls to guide its motion, since there is no line on the ramp. After getting off the ramp, the robot looks once again for the line and starts following it.

For this last part of the project, the robot had to be trained to maneuver for longer distances on the ramp without the aid the black line provides. Before climbing each time, the robot attempts to adjust its trajectory to align as much as possible with the ramp, and then increases its speed to compensate for the incline. Once it has reached the center of the ramp, which is again flat, speed is decreased back, and the robot carefully moves forward sensing for the walls with its horns, until the change in color on the surface lets it know that the end of the ramp has been reached.

The program reaches its end when a completely white block is found along the way. The robot stops, switches to stand-by mode, and signals the end of the sequence with a beep. The onboard computer remains on until it is turned off by hand. As long as the computer is on, the sequence can always be initiated again by pressing the Start button.

 

The Interactive C code developed for this assignment is presented here.

Return to introduction


Alejandro J. Trejo
University of Texas at El Paso
Last update: 09 Apr 1999.