Slowing down rotary encoder using interrupts