
120 Make: Robotic Arms
Serial.print(alphaOne);
Serial.print(" beta One:");
Serial.print(betaOne);
Serial.print(" alpha Two: ");
Serial.print(alphaTwo);
Serial.print(" beta Two:");
Serial.print(betaTwo);
Serial.print(" Alpha: ");
Serial.print(alphaFinal);
Serial.print(" Beta: ");
Serial.println(betaFinal);
servoOne.write(alphaFinal);
servoTwo.write(betaFinal);
delay(1000);
}
}
Much of the code in this most recent example is the
same as before. The key differences are the creation
of a matrix to hold the coordinate points of the four
corners of the square and a for loop to help our
program count through the various points to trace
the squar ...