This function creates an instance of StepMotor Class for EMBRYO 2 that represent a linear axis of the robot. Use it at the top of your sketch, above setup()
and loop()
.
StepMotor(AXIS_ID,
enablePin,
directionPin,
pulsePin,
homePin,
farPin,
forwardPin,
backwardPin,
startPin,
emergencyStopPin);
#include <Arduino_EMBRYO_2.h>
StepMotor axis(1, A5, 5, 6, 3, 4, A2, A1, 2, 12);
void setup() {}
void loop() {}