Rotary encoders usually provide quadrature pulses that indicate both the amount of rotation and the direction (Figure 1). A microcontroller can calculate the rotation direction and keep track of ...