Draws a circle with both axis of EMBRYO 2.
robot.drawCircle(centerX,
centerY,
radius)
#include <Arduino_EMBRYO_2.h>
StepMotor axisX(1, A5, 5, 6, 3, 4, A1, A2, 2, 12);
StepMotor axisY(2, A5, 10, 11, 8, 9, A3, A4, 2, 12);
Embryo robot(axisX, axisY, 2, 12);
void setup() {
Serial.begin(9600);
while (!Serial) {};
robot.begin();
robot.setLengthXY(45, 25);
Serial.println("Press the Start Button to start the machine");
while(!robot.ready());
Serial.println("Moving the robot to the initial XY position ...");
robot.toPositionXY(15, 15);
Serial.println("Press the forward button to continue ...");
}
void loop() {
if(axisX.readBtnForward()){
robot.drawCircle(15, 15, 5);
}
}