int stepCounter;
int steps = 2000;

  #define X_STEP_PIN                           26 // 54
  #define X_DIR_PIN                            28 // 55
  #define X_EN_PIN                             24 // 38
  #define X_CS_PIN                             42 // EXP2_07_PIN
  #define X_LIMIT                               3  // X_MIN_PIN

void setup()
{
pinMode(X_EN_PIN, OUTPUT); // Enable
pinMode(X_STEP_PIN, OUTPUT); // Step
pinMode(X_DIR_PIN, OUTPUT); // Richtung

digitalWrite(X_EN_PIN,LOW);
}

void loop()
{
digitalWrite(X_DIR_PIN,HIGH); // im Uhrzeigersinn

for(stepCounter = 0; stepCounter < steps; stepCounter++)
{
digitalWrite(X_STEP_PIN,HIGH);
delayMicroseconds(500);
digitalWrite(X_STEP_PIN,LOW);
delayMicroseconds(500);
}
delay(1000);

digitalWrite(X_DIR_PIN,LOW); // gegen den Uhrzeigersinn

for(stepCounter = 0; stepCounter < steps; stepCounter++)
{
digitalWrite(X_STEP_PIN,HIGH);
delayMicroseconds(500);
digitalWrite(X_STEP_PIN,LOW);
delayMicroseconds(500);
}
delay(1000);
}
