void loop()
{
digitalWrite(X_DIR, HIGH); // Set Dir high
for(x = 0; x < 106; x++) // Loop 200 times
{
digitalWrite(X_STEP, HIGH); // Output high
delayMicroseconds(800); // Wait 1/2 a ms
digitalWrite(X_STEP, LOW); // Output low
delayMicroseconds(800); // Wait 1/2 a ms
}
delay(1000); // pause one second
digitalWrite(X_DIR, LOW); // Set Dir low
for(x = 0; x < 106; x++) // Loop 2000 times
{
digitalWrite(X_STEP, HIGH); // Output high
delayMicroseconds(800); // Wait 1/2 a ms
digitalWrite(X_STEP, LOW); // Output low
delayMicroseconds(800); // Wait 1/2 a ms
}