Now working with the rotary encoder as input