It is amazing how many Arduino programmes for decoding rotary encoders start with something like: “I looked at all the available rotary encoder sketches and none of them met my needs, so I have written my own, and here it is”. Well, I looked at all the available rotary encoder sketches and none of them …
This story continues at Rotary encoder decode for Arduino
Or just read more coverage at Electronics Weekly