Stepper Moves, IR Flashes, Repeat... How?

Thanks Ian, but no joy. This just cycles through the whole thing endlessly. Doesn't stop at 5, doesn't wait for a button press.