
172 Make: Robotic Arms
WHAT ARE WE BUILDING?
Now that we have understand and have gathered all the equations we need
to calculate the inverse kinematics of our system, it’s time to turn these
equations into code so we can use them to control our robot. This first
example will be the basic code we need to perform the calculations.
STEP 1: CONVERTING OUR INVERSEKINEMATICS EQUATIONS
INTO CODE
double linkOne = 48.0;
double linkTwo = 120.0;
double linkThree = 100.0;
double x = 120.0;
double y = 120.0;
double z = 120.0;
double c;
double d;
double Zoffset;
double theta;
double alphaOne;
double alphaTwo;
double alphaFinal;
double beta;
void setup ...