
71Chapter 4: More Links, More Precision
#include <Servo.h>
Servo servoOne;
Servo servoTwo;
void setup() {
servoOne.attach(3);
servoTwo.attach(5);
}
void loop() {
servoOne.write(135);
servoTwo.write(45);
}
STEP 6
Find the robotic-arm component labeled “Four
Link: Link One.” It will have a servo connection on
one side of the link and a simple hole on its other
side, as shown at upper right (Figure
4-5
).
STEP 7
Attach one of these links to servo 1 with the motor
located on the left. (Take care not to accidentally
rotate the output shaft as you bolt the links onto
the metal servo connectors.)(Figure
4-6
).
STEP 8
For this next step, you’ll need a few new
components: ...