This is small and fast Arduino library for Rotary Encoder with interrupts.
Arduino library for the KY-040 Encoder