Project 7: Analog Joystick Control
Write a program to allow you to drive your robot around with the
joystick. Make it work well, easy to use, etc... We'll combine the
best programs and install them on every board in the template program!
Some things you should definitely consider:
For extra "points" and amusement, add more features, such as:
- From use to use, the joystick calibration may change, so you
should have some way to recalibrate the joystick every time you run the
- When below some % power (around 30%, but it will vary from robot
to robot), the motors don't turn and make that horrible whining
noise. You might as well just have the motors be off in this case.
- When the joystick is at rest, the motors should both be off, even
if the center point of the joystick varies a little bit.
- You want to be able to get all the way up to 100% power, even if
the joystick drifts a little off calibration.
- Have the joystick buttons do something interesting on a robot
- Have the program know a few "preferred" directions, so that if you
push the joystick almost straight forward but a little to the side,
the program knows you really want to drive straight forward and
- Have the program somehow constantly recalibrate itself on the fly
(while you're using it)
- Use the buttons and joystick to play back specific robot behaviors
(dance moves? etc...)
- Set up a way to record the path you drove a robot through, and a
way that you can set up the robot to "play back" the route on its own.