I'm using rotary encoders for my project. Firstly, I wanted to test if the encoders work. However, it seems that the interrupt is not working as it just displays "0" and hence not changing states. This is the code I'm running. I've also tried using the other interrupt pins but it results in the same problem.
NoName12221:
But I'm not sure why this makes it work.
It's about the wiring which you chose to make us try to guess about. I guess we didn't guess correctly how you had your encoder connected. Next time show it.