I’m aiming to work with eventually nine rotary encoders (KY-040). I started with one. The code worked well, for a second encoder I copied the relevant snippet and adjusted the variables. Works perfectly fine. (With this little code I can still go without interrupts.)
So I was thinking that I can just do the same for the third encoder (like: defining variables for the third encoder and copying the part needed). What I have now is: I am still able to read encoder 1 and 2. For encoder 3 nothing happens. What exactly am I missing? Thanks for sparing your time!
three-encoders.ino (2.42 KB)