included functions for reading rotary encoders and pushbutton inputs