[hw640] has put together a well written and detail packed explanation of how to interface with a digital rotary switch ... Each of the switch’s 2 output pins is attached to a pin change ...