
152 Make: Robotic Arms
Once you have written, compiled, and uploaded the code, as you
move the encoder’s knob, you should see the value of the counter
increasing and decreasing, as well as printing the message “Button
Pressed!” whenever the encoder’s internal push-button is pressed
(Figure
8-2
).
STEP 3: ADDING OUR MOTORS
Now that we know our encoder is working properly, it’s time to add our
motors back in. Just as before, we’re going to take this one step at a time,
making sure all our motors are behaving exactly as we expect, before we
throw everything together. Let’s begin from the bottom up, and add the code
we need to make our base-rotation ...