Using NQC on the RCX
You are to build a LEGO robot that has two motor-driven wheel drives,
two front bumpers, each
with a touch sensor, and one downward-pointing light sensor. The robot
should be able to move
forward, backward, and turn, as well as sense light-colored and dark-colored
areas on the floor
and respond to bumping into objects on its front-left and front-right sides.
The Roverbot described
in the LEGO RIS Constructopedia would be a good candidate. This robot will
be controlled with
the LEGO RCX brick programmed in the NQC (Not Quite C) language. You are
to write an
NQC line-following and obstacle-avoiding program for your robot. The robot
should be able to
find the oval black track on the cardboard that comes with the Mindstorms
kits and follow it. In
addition if it bumps into an obstacle, it should back up and turn away,
then resume following the
black line. You may use either the command line NQC compiler that is already
on the computers
in the H1 lab or, preferably, the Bricx Command Center (BricxCC) Interactive
Development
Environment to create, compile, and download your NQC programs to the RCX.
The BricxCC
is on the machines in the lab and also available at: http://bricxcc.sourceforge.net/
Robots will compete against each other to see which can run the length
of black track fastest.