
176 Make: Robotic Arms
in, we can create three sets of for loops, just as we did before, that will allow
us to test the linear motion of our new system in the x, y, and z directions:
#include <Servo.h>
Servo servoOne;
Servo servoTwo;
Servo servoThree;
Servo servoFour;
Servo servoFive;
double linkOne = 48.0;
double linkTwo = 120.0;
double linkThree = 120.0;
double x = 200.0;
double y = 0.0;
double z = 200.0;
double c;
double d;
double Zoffset;
double theta;
double alphaOne;
double alphaTwo;
double alphaFinal;
double beta;
void setup() {
servoOne.attach(3);
servoTwo.attach(5);
servoThree.attach(6);
servoFour.attach(9);
servoFive.attach(10); ...