Stepper motor with Arduino and DRV8825

Robin2:
Did you try my code.
What power supply are you using for the motor (volts and amps) ?

Yes Robin, I tried with the same inconsistent and chaotic movement result.
I'm using a 12V 2A AC/DC adapter. I didn't checked its performance (because I don't know how) but I'll try to find a better/bigger one this days.

Regards,

LE. I solved the problem. Doing so many attempts I forgot to connect the two GND each other (power and Arduino). Now your code is working fine.
Thank you for your help.