I tried your code and still does not work… I attach you a picture of the setup but I guess it is well connected. I am using an ATX source, black cables connect the grounds of arduino, the driver and the source. Pin 2 (blue wire) is the step pin and the green wire, pin 3, is the direction pin.
The rated current is 1.2 A/phase. I have already set the current of the driver following the equation that appears in the datasheet and the video.
By the way I have found another code that works from the library of arduino. The only problem is that I want to stop the motor once it has rotated the degrees I want, right now as the instruction it is inside the loop it keeps doing the function. Shall I place a button on the breadboard or is there a possibility to do it directly from the code? If so how can I connect the button and what is it the modification I have to do in the code? I show you the code that it is working
Thank you very much
[code]#include <Stepper.h> //Imported from the library
#define STEPS 200 //set the number of steps
// define the motor name, step pin, and direction pin
Stepper stepper(STEPS, 2, 3);
// speed RPM
//make a turn in one direction