steppermotor only few steps

hi Bob,

off course you can't check the program as it isn't in the reply, here it is:

const int stepPin = 3; 
const int dirPin = 4; 
int relpin = 12;
const int stepsPerRevolution = 200;

boolean running = false;
 
void setup() {

  pinMode(stepPin,OUTPUT); 
  pinMode(dirPin,OUTPUT);
  pinMode(relpin, INPUT);
  digitalWrite (relpin, LOW);
  Serial.begin(9600);
}

void loop() 
{
  if (digitalRead(relpin)==HIGH)
  running = true;
    if (running == true)
    {
      digitalWrite(dirPin,HIGH); 
      for(int x = 0; x < 200; x++) 
            {
            digitalWrite(stepPin,HIGH); 
            delayMicroseconds(500); 
            digitalWrite(stepPin,LOW); 
            delayMicroseconds(500); 
            }
    }


  else
      digitalWrite(dirPin,LOW); 
      for(int x = 0; x < 200; x++) 
            {
            digitalWrite(stepPin,HIGH); 
            delayMicroseconds(500); 
            digitalWrite(stepPin,LOW); 
            delayMicroseconds(500); 
            }
}