Closed LoungeFlyZ closed 3 years ago
I found that this was being caused by not using two interrupt pins for the rotary encoder. The LCD library must also use interrupts and it conflicts I think. I switched to an Arduino Mega which has more interrupt pins and used two for the encoder and its all working correctly now. Closing this issue.
Yes, the encoder library needs interrupt pins to operate.
If you have any question. Please feel free to find me again.
I started with just using the serial output and everything worked well. I turned it clockwise and then counter clockwise and here is the output i got the following as expected:
Then i enabled HD44780 using
#define DISPLAY_MODE 2
and tried again. However this time the same rotary changes gave erratic output:You will notice the duplicates and that it only ever counted up.
I have the rotary encoder using pins 10, 11 and 12. And the HD44780 using SDA & SCL on my Leonardo.
Any idea what might be going wrong?