Rotary encoder library for Arduino