Tell us about yourself!
I tried a few things and a few different codes, pins, adding separate pull-up. And today I have gone to my local shop and got a few more rotary decoders. I thought they are all created equal, but they are not. So your code works fine with a different type of encoder. So misery solved.
Hi Simon, I have used your code on a Arduino mini, using pin 2 and 3. When I turn the encoder the code counts up, but when I turn the other direction, it does nothing (counts up every 4th or 5th turn). If I swap the pin 2/3 wires, the effect is similar, but only counts down.On my encoder the ground pin is on the left. I think I got that right, otherwise it would not count in either direction. Any ideas? I have nothing else in the sketch and nothing else connected.
2-Player Bartop Arcade Machine (Powered by Pi)
Electronic-Lab in a Box
Time Lapse Dolly