Start by building the Bumper Car.
Click the picture for building instructions.
|Connect the neck motor wire to port A on the
NXT, and the ultrasonic sensor wire to port 4 on the NXT.
Important: Make sure that the wires stay out of the way of the bumper and that there
is enough slack so that the head can pivot all the way to the left and
Use the Explorer
program for the Explorer. This program makes the robot repeat
the following steps:
Go straight until
either the ultrasonic sensor sees something close or the bumper is
If the bumper was hit,
make a sound and back up a little.
Turn the head to look
right and then left, and use the ultrasonic sensor to determine
which direction appears to have more space, then turn in that
|Make sure the "eyes" of the ultrasonic sensor are
pointed straight ahead before running the
Explorer program, so that robot
is not confused about which way is which.
Set your Explorer loose
and see if you can predict which way it will turn each time it
approaches an obstacle, and try to guess where it will end up.
Will it get stuck anywhere?
For an advanced
programming challenge, try modifying the
Explorer program to change
what happens when the Explorer "sees" an obstacle or bumps into
something. Can you come up with a better navigation strategy
that is more interesting or less likely to get stuck?
2007-2011 by Dave Parker. All rights reserved.
All project designs, images, and programs are protected by copyright. Please see
the usage policy.