raspberry pi rotary encoder reader code