If you want it to run only once in loop:
void loop()
{
static boolean runOnce = true;
if (runOnce)
{
stepper1.move(3000);
stepper1.runToPosition();
stepper1.move(-500);
stepper1.runToPosition();
runOnce = false;
}
}
If you want it to run only once in loop:
void loop()
{
static boolean runOnce = true;
if (runOnce)
{
stepper1.move(3000);
stepper1.runToPosition();
stepper1.move(-500);
stepper1.runToPosition();
runOnce = false;
}
}