An example of decrypting a quadrature rotary encoder with the interrupts on an Arduino.