stepper motor control using button

PaulS:

  // Initialize the pushbutton pin as an input pullup

(buttonPin, INPUT_PULLUP);



Something missing there? Seems like you would need to use a function to actually accomplish that.

I dont know how but I have lost a part of that line, it is actually this

pinMode(buttonPin, INPUT_PULLUP);

PaulS:
Why are you not using the Stepper library?

I have implemented stepper library but nothing changed.