Accelstepper function

The while(1) is an endless loop so nothing will happen until the board is reset.

That is what I had to go by. There is nothing there to suggest that anything else is to happen.

You could replace the while with a flag and make the execution of the sequence conditional on the state of the flag.