
39Chapter2: Two Degrees of Freedom
We still have the signal wire of servo 1 connected to digital
pin 3 and the signal wire of servo 2 connected to digital pin 5,
and we have added our four push-buttons. Remember from
chapter 1 that one of the easiest ways to integrate buttons with
an Arduino circuit is to connect one side of a push-button to a
digital pin and the other side to GND. Here, we have two sets of
push-buttons that will control servo 1, plugged into digital pins
6 and 7, and our other two push-buttons will control servo 2,
plugged into digital pins 8 and 9. (We have also added one extra
wire that connects the two GND rails to each other ...