How to read an encoder and control a stepper motor without delay()

http://www.circuitsathome.com/mcu/reading-rotary-encoder-on-arduino