Please follow below steps to connect stepper driver to Arduino:
1. Connect driver’s DIR+ and PUL+ to Arduino’s digital port. eg. PIN8 and PIN9.
2. Connect PUL- and DIR- to Arduino’s GND.
3. Write program on your computer by pointing PIN8 and PIN9 to DIR and PUL.
4. Download the program to Arduino, and power Arduino by 5V power supply.
Below schematic diagram is showing the basic connection of Arduino, stepper driver, power supply and stepper motor.

We also provide a simple demo code

int x;
void setup() {
pinMode(9,OUTPUT); // set Pin9 as PUL
pinMode(8,OUTPUT); // set Pin8 as DIR
void loop() {
digitalWrite(8,HIGH); // set high level direction
for(x = 0; x < 400; x++) // repeat 400 times a revolution when setting 400 on driver
digitalWrite(9,HIGH); // Output high
delayMicroseconds(500); // set rotate speed
digitalWrite(9,LOW); // Output low
delayMicroseconds(500); // set rotate speed
delay(1000); //pause 1 second
digitalWrite(8,LOW); // set high level direction
for(x = 0; x < 400; x++)


Demo code: Stepper_motor_demo_code.ino