Skip to content

Add support for stepper motors #4

@JamesNewton

Description

@JamesNewton

https://www.airspayce.com/mikem/arduino/AccelStepper/classAccelStepper.html
Not sure it supports changing the pin the motor is connected to. You have to set the pins and type in the instantiation of the sepper object.
AccelStepper stepper(AccelStepper::DRIVER, STEPPER_STEP_PIN, STEPPER_DIR_PIN)
Pre-set the stepper motor pin? Or can we call stepper.AccelStepper(AccelStepper::DRIVER, p, n) after the fact?

Op Description
#,#M step, direction Motor stepper.AccelStepper(AccelStepper::DRIVER, p, n) (or hard code pins if necessary)
#,#V acceleration,velocity stepper.setAcceleration(p + 1);stepper.setMaxSpeed(n);
,#V velocity (p is zero) stepper.setAcceleration(DEFAULT_ACCEL);stepper.setMaxSpeed(n);
#G position Goto stepper.moveTo(n);
#E pin Endstop. Input with Pullup. Run motor ccw until pin goes low. stepper.setMaxSpeed(SLOW_SPEED); stepper.moveTo(-MAX_LONG); if (!digitalRead(n)) stepper.stop();

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions