Data Sheet
105 : circuit 5c
CODING CHALLENGES
CHANGE THE DISTANCE AT WHICH YOUR ROBOT REACTS: Try
changing the distance at which your robot stops and turns away from an obstacle.
CHANGE THE BEHAVIOR OF THE ROBOT WHEN IT SENSES AN
OBSTACLE: Try changing the code so that your robot does something different
when it senses an obstacle.
TROUBLESHOOTING
The robot drives
backward and/or turns
in the wrong direction
Check the wiring of your motors and the way that they are
mounted to the baseplate. If one of your motors is flipped
around, reposition it, or switch its black and red wires on the
breadboard (this will reverse the direction that it turns).
The robot runs into
obstacles
You can try gently bending the pins of the distance sensor so
that it points straight ahead. The robot will get stuck if one
wheel hits an object that it is driving past (the distance sensor
won’t see the obstacle unless it’s in front of the robot).
The robot drives slow
or not at all, though the
RedBoard is powered
Try installing fresh batteries. These slow or sporadic behaviors
are symptoms that your robot may be running out of power.
Please note that the 4 AA batteries output about 6 or 7V,
which is just below the recommended input voltage for the
RedBoard. You can also use 9V batteries with a proper adapter,
though their battery life won’t last as long.
Still not working?
Jumper wires unfortunately can go “bad” from getting bent
too much. The copper wire inside can break, leaving an
open connection in your circuit. If you are certain that your
circuit is wired correctly and that your code is error-free and
uploaded but you are still encountering issues, try replacing
one or more of the jumper wires for the component that is
not working.