
90 Make: Robotic Arms
Joysticks are useful devices for creating inputs within robotics projects, and
getting our joysticks to control the servo motors within our project will be a
snap. All we need to do is add the code we wrote to send angle commands to
our motors.
When it comes to using joysticks to control servos, there are a few ways to
deal with the control of our joints: Look back at our potentiometer code: The
use of the map() command was helpful—it allowed us to directly convert
the range of data being read from the potentiometer (0 to 1023) to the range
of data our servos required (0 to 180). Let’s wire our servos and update our
previous ...