Controlling the stepper motor

At the end of the sketch, replace:

delay(1000);

With:

while(1); // Press reset button to continue