If I'm reading your code correctly, you have a 2-second delay on each iteration of the loop(). That's not going to work reading an encoder, or switches.
If I'm reading your code correctly, you have a 2-second delay on each iteration of the loop(). That's not going to work reading an encoder, or switches.