rotary encoder alternative