[SOLVED] Rotary Encoder only increments

And now........ for the (optional) sequel ...... consider setting up interrupt pins and interrupt channels to detect a transition (like a high-to-low) transition of one of your encoder signals. And when a transition is detected.....read the values of the two encoder signals. Then get the program to make a decision (or do something) based on those readings.

Eg....when an interrupt occurs (when a falling edge of one signal is detected)..... one signal level maybe be low, while the other is high.... so increment. And, for a different condition....if one signal level is low and the other signal level is low.... decrement.