Stepper starts stepping on power

hey
I'm using the AccelStepper.h library to turn a stepper a full rotation with a button push.
But I'm getting a weird behavior. when I apply power, the stepper takes a few steps before the loop even starts.
I've defined an enable pin and last line in the setup is enableOutput. (yes I remembered to change inverted pin for the enablePin. using a4988).
This problem returns even when I'm using a slightly modified example.

Could this be a fault in the driver itself?
Thanks in advance

During bootup the pins usually float. Stepper drivers with direct logic inputs can catch false signals if connected to floating wires. Try to add a pulldown resistor to the step pin.

thanks :slight_smile:
do you know what range of values should I try first?

Something from 1k to 10k should be Ok.

worked as expected. Thank you!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.