
OKAY ROBOT Inverse Kinematics Drawbot
found in Figure
C
. Connect the red wires of both
servos to the positive rail on the breadboard, and
the black wires to the negative rail. Connect the
yellow wire for servo 1 to digital pin 3, and the
yellow wire for servo 2 to digital pin 5. Connect
the GND pin on the Arduino to the negative rail on
the breadboard. Lastly, connect the positive and
negative rails to the 5V 2A power supply.
5. We can now write a quick Arduino sketch to set
both servos to a starting position of 90 degrees:
#include <Servo.h>
Servo servoOne;
Servo servoTwo;
void setup() {
servoOne.attach(3);
servoTwo.attach(5);
}
void loop() {
servoOne.write(90); ...