Skip to content

stepper motor control #10

@JamesR-59

Description

@JamesR-59

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions