Controlling stepper motor with serial monitor - motor stops during each read

Is it possible to use this code also with the A4988 module? Only 2 output pins are enough?