################################################################################ If you want to do it digital, a pair of HC164 shift registers will let you shift a bit till you see it on the input, with the switch selecting which SR output is looked at. Literally N clocks = switch position. ################################################################################ optical rotary encoder - digikey ################################################################################