Main Content

Improved Arduino Rotary Encoder Reading

I wanted to use a low cost rotary encoder as an input mechanism for one of my upcoming projects and was initially bewildered by the code options available to take readings from the rotary encoder and determine how many “detents” or cycles the encoder had clicked past and in what direction. I think my main sketch will need to use most of my Arduino’s memory so I am avoiding the various available encoder libraries which seemed to be difficult to make work when I tried a couple of them and use far more of the code budget than the sketch-based code approaches discussed from here on.”

Link to article