stepper motor control

I'm not sure about that. I've not used the stepper library so there could be some subtle issue I don't know about.

Does it work if you put constants in place of the variables?

if (digitalRead(1) == HIGH) {
    stepper.step(-25);
  }
  else {
    stepper.step(25);
  }