Rotary Encoder AnalogRead()

Does anyone have code showing how to read Keyes 040 Rotary Encoder using analogRead ?

ejalogic:
Does anyone have code showing how to read Keyes 040 Rotary Encoder using analogRead ?

The Keyes 040 Rotary Encoder isn't an analog device. You need to monitor the pins as they change to keep track of the encoder's position. Here's one of several promising websites I found with a quick search.

It looks like you could use normal quadrature encoder code.

I personally think the author of the article worried too much about the glitches. Properly written quadrature encoder code will automatically correct for spikes like those seen in the traces the author displayed.

Thanx for the reply . I will use the digital i/o pins. Thanx again.