laurb9 / StepperDriver

Arduino library for A4988, DRV8825, DRV8834, DRV8880 and generic two-pin (DIR/STEP) stepper motor drivers
MIT License
556 stars 228 forks source link

Please advice on constant rotation #111

Closed vadimkim closed 2 years ago

vadimkim commented 2 years ago

Hi, Is it possible to "turn motor ON/OFF" unless some external event happens? I need to change rotation direction each time button is pushed. Right now I execute move(360) and check button state unless button is pressed in the loop. Movement is not smooth.

laurb9 commented 2 years ago

You can try the NonBlocking example for more fine grained access between steps.

vadimkim commented 2 years ago

Thank you, @laurb9! It works!