Stepper Motor + EasyDriver

Hi again I'm having some issues to get right this code:
I'm ussing a easydriver but I can make it right...

int Distance = 0;  // Record the number of steps we've taken
void setup() {                
  pinMode(8, OUTPUT);     
  pinMode(9, OUTPUT);
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);

}
void loop() {
  digitalWrite(9, HIGH);
  delayMicroseconds(100);          
  digitalWrite(9, LOW); 
  delayMicroseconds(100);
  Distance = Distance + 1;   // record this step
  if (Distance == 3600)
  {
    if (digitalRead(8) == LOW)
    {
      digitalWrite(8, HIGH);
    }
   else
    {
      digitalWrite(8, LOW);
    }
    Distance = 0;
    delay(500);
  }
}

The Issue is I want to add 2 buttons but when I add this function... all gone bad... this is crazy

You want to add two buttons... to do what? How are you adding them?

First step, study and learn the Blink Without Delay example sketch. So you can get rid of those delay() functions.

I.m Sorry to move the stepper Front (Clockwise) and Back (CounterClockSwise)
The Issue is I was trying with the arduino examples and just one direction this can happend... also the easydriver is reallyhot and this is how I wire it.

If it is getting hot, you should turn the current down a bit.

So.... study the Blink Without Delay, and use micros() instead of millis() to time your stepper motor. One button will pull the DIR HIGH, the other will pull DIR LOW, and you want the STEP to be enabled if and only if one and only one button is pressed.

I strongly suggest you use distance >= 3600 rather than ==. If for some reason it passes 3600, it won't get stuck forever counting.

You could also use the tone() command. Either run it for a fixed time, or turn it on only when just one button is pressed. Harder to get an accurate count of the steps, although you can get close using micros().