   stepperY.run();
   stepperX.run();
 }
-void setY() {
-  stepperX.stop();
+void homeXIsr() {
   stepperX.setCurrentPosition(0);
+  stepperX.move(0);
   homeing = false;
 }
 void loop()

{
  Serial.begin(57600);
  Serial.setTimeout(25);
  stepperX.setMaxSpeed(2000);
  stepperX.setAcceleration(5000);


  stepperY.setMaxSpeed(2000);
  stepperY.setAcceleration(5000);


  Timer1.initialize(50); // microseconds
  Timer1.attachInterrupt( timerIsr ); // attach the service routine here
  pinMode(2, INPUT_PULLUP);
  attachInterrupt(0, setY, FALLING);
  pinMode(6, OUTPUT);
  pinMode(9, OUTPUT);



  if (homeing) {
    enable();
    if (!digitalRead(2)) { // Allready at home position
      stepperX.move(1000); // Move away from home
      }
    if (digitalRead(2)) {  // If not homed
      stepperX.move(-1000);// Move towards home
    }
  }
}

void enable() {
