A subclass of Mike McCauley's excellent AccelStepper library (http://www.airspayce.com/mikem/arduino/AccelStepper) that uses an encoder to record and correct motion.