hi,
thank you for your reply, here is he code i am using with arduino and shield. my motor is nema17 and drivers i am using are a4988
const int stepPin1 = 2;
const int dirPin1 = 5;
const int stepPin2 = 3;
const int dirPin2 = 6;
void setup() {
// Sets the two pins as Outputs
pinMode(stepPin1,OUTPUT);
pinMode(dirPin1,OUTPUT);
pinMode(stepPin2,OUTPUT);
pinMode(dirPin2,OUTPUT);
}
void loop() {
digitalWrite(dirPin1,HIGH); // X FRD 1
for(int x = 0; x < 20; x++) {//X FRD 1
digitalWrite(stepPin1,HIGH); //X FRD 1
delayMicroseconds(5000); //X FRD 1
digitalWrite(stepPin1,LOW); //X FRD 1
delayMicroseconds(5000);//X FRD 1
}
delay(200); // One second delay 1
//X FORWARD END BLOCK 1
digitalWrite(dirPin1,LOW); // X REV 1
for(int x = 0; x < 19.25; x++) {//X REV 1
digitalWrite(stepPin1,LOW); //X REV 1
delayMicroseconds(5000); //X REV 1
digitalWrite(stepPin1,HIGH); //X REV 1
delayMicroseconds(5000);//X REV 1
}
delay(100); //X REV 1
//X REVERSE END
digitalWrite(dirPin1,HIGH); // X FRD 2
for(int x = 0; x < 20; x++) {//X FRD 2
digitalWrite(stepPin1,HIGH); //X FRD 2
delayMicroseconds(5000); //X FRD 2
digitalWrite(stepPin1,LOW); //X FRD 2
delayMicroseconds(5000);//X FRD 2
}
delay(200); // One second delay 2
//X FORWARD END BLOCK 2
digitalWrite(dirPin1,LOW); // X REV 2
for(int x = 0; x < 19.25; x++) {//X REV 2
digitalWrite(stepPin1,LOW); //X REV 2
delayMicroseconds(5000); //X REV 2
digitalWrite(stepPin1,HIGH); //X REV 2
delayMicroseconds(5000);//X REV 2
}
delay(100); //X REV 2
//X REVERSE END
for(;;){}
}