Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for stepper motors #4

Open
JamesNewton opened this issue Dec 8, 2021 · 0 comments
Open

Add support for stepper motors #4

JamesNewton opened this issue Dec 8, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JamesNewton
Copy link
Owner

JamesNewton commented Dec 8, 2021

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();
@JamesNewton JamesNewton self-assigned this Dec 8, 2021
@JamesNewton JamesNewton added the enhancement New feature or request label Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant