control a stepper motor with rotary encodeer