waspinator / AccelStepper

Fork of AccelStepper
http://www.airspayce.com/mikem/arduino/AccelStepper/
Other
146 stars 86 forks source link

Does AccelStepper support all stepper motor drivers? #14

Open joaomamede opened 2 years ago

joaomamede commented 2 years ago

I would like to use it with DRV8825 or with an A4988.

Thanks so much for the software

drf5n commented 9 months ago

It supports many STEP/DIR drivers like DRV8825 and A4988 with:

https://github.com/waspinator/AccelStepper/blob/1255ab56820746137aba3d5d788f5d0b9baf6d4a/src/AccelStepper.h#L347

It is a bit wierd, but the plain old non-acceleration Arduino stepper.h library can also support STEP/DIR drivers as a 2-wire motor. The catch is that you need to use one of the pins as "clock" = "DIR" and the the other pin as "data"=STEP and send 4 stepper.h steps per each 1 motor step to get STEP to toggle. See https://forum.arduino.cc/t/stepper-driver-with-quadrature-from-stepper-h-or-encoder/1121041