stepper motor control
JamesR-59 opened this issue · comments
Hi Jonathan
I've been using "Eventually" to de-bouncing control inputs and to control a stepper motor, at present I'm doing the following:
To control stepper motor speed I'm using the following:
mgr.addListener(new EvtTimeListener(0, true, (EvtAction)motorspeed)); //Pulse Stepper Motor
bool motorspeed() { //Pulse output to step motor
if (motorstep == 0) {
motorstep = 1;
digitalWrite(8, HIGH);
} else {
motorstep = 0;
digitalWrite(8, LOW);
}
return false;
}
However the sketch is limiting the stepper motor speed compared to using
#include <AccelStepper.h> and a while statement
Look forward to your comments
Thanks
James
stepperMotor_control.zip