Use the arduino encoder library and interrupts for speed