My rotary encoder works fine with UNO, but when I switched to Mega2560 I cannot get it to work. I checked all the pins on Mega for interrupt but now In thinking the issue is in the code.
I’m trying to get the code to read the number of steps the motor is taking
Could anyone help me figure it out or guide me in some direction?
I have tried almost all the pins mentioned on the net as Arduino interrupt pins, but regardless it should work with the default digital pins 2-3 in code since those are mega interrupt pins too.
motors_using_methods_.ino (4.07 KB)
PinChangeInt.h (15.6 KB)