polling works, but not interrupts
I can't get this to work with interrupts on an Arduino Nano (and Attiny85 ultimately). Software polling works.
Starting with the example cocde, I defined the rotary encoder with pins 8 and 9, and attached interrupts 0 and 1 to the rotate subroutine. With software polling I measure a pullup on the rotary encoder, but not when using the interrupts. I added a pullup with a 2K resistor to 5V, which doesn't help.
Did you declare your variables (used in the ISR) to be volatile?
Did you declare your variables (used in the ISR) to be volatile?
No, I just used the interrupt example as it is. Only changed the pin numbers. With my extra code, later on, this would be necessary alright.
Use the same pins you declared Rotary on for attaching the interrupts, worked for me