Muovere Passo passo tramite pulsante

E' vero scusatemi ecco l'intero codice:

int DIR_PIN_M1 =3; //7
int STEP_PIN_M1 =2; //5
int SLEEP = 6; // PIN 12 = SLP
int DIR_PIN_M2 =3;
int STEP_PIN_M2 =2;

const int buttonPin = 10; //Setting button number 1 to Pin 2
int buttonState = 1; //Setting button state to off

const int buttonPin1 = 12; //Setting button number 1 to Pin 2

void setup() {
pinMode(DIR_PIN_M1, OUTPUT);
pinMode(STEP_PIN_M1, OUTPUT);

}

void loop(){

//specifica numero giri e tempo di attesa

if ( digitalRead(buttonPin) == 0) {
rotateDeg(-3000, 0.7);
delay(000);
}

if ( digitalRead(buttonPin1) == 0) {
rotateDeg(3000, 0.7);
delay(000);
}
}

void rotateDeg(float deg, float speed){
//rotate a specific number of degrees (negitive for reverse movement)
//speed is any number from .01 -> 1 with 1 being fastest - Slower is stronger
int dir = (deg > 0)? HIGH:LOW;
digitalWrite(DIR_PIN_M1,dir);

int steps = abs(deg)*(1/0.225);
float usDelay = (1/speed) *70;

for(int i=0; i < steps; i++){
digitalWrite(STEP_PIN_M1, HIGH);
delayMicroseconds(usDelay);

digitalWrite(STEP_PIN_M1, LOW);
delayMicroseconds(usDelay);
}

}
void rotate_M2(int steps, float speed){
//rotate a specific number of microsteps (8 microsteps per step) - (negitive for reverse movement)
//speed is any number from .01 -> 1 with 1 being fastest - Slower is stronger
int dir = (steps > 0)? HIGH:LOW;
steps = abs(steps);

digitalWrite(DIR_PIN_M2,dir);

float usDelay = (1/speed) * 70;

for(int i=0; i < steps; i++){
digitalWrite(STEP_PIN_M2, HIGH);
delayMicroseconds(usDelay);

digitalWrite(STEP_PIN_M2, LOW);
delayMicroseconds(usDelay);
}

}