
17Chapter 1: The Foundation of Robotic Arms
MAKING OUR FIRST MOTOR MOVE
We have our first Arduino sketch under our belt,
and now that we have that taken care of, it’s time to
write some code specifically for the circuit we built.
Look back at our first circuit: We have three wires,
each plugged into one of the three connectors on
our servo motor. The red wire is our positive voltage,
plugged into the 5 V pin; the brown wire is our ground
connection, plugged into one of our GND pins; and
our yellow wire, our signal wire, is plugged into
digital pin 3. Thankfully, we don’t need to do any
programming for our red and brown wires, because
all they ...