Add more pins with interrupt (for Motor Encoder)

Or.

Do a little research and play your encoders without using interrupts.

As much fun and utility they can be, interrupts can be tricky and very often can be programmed without. I invented my own encoder, then I discovered almost exactly the same thing in a nice library.

They basic trick is to give your encoders some regular attention by calling a service routine from your main loop.

can do either. Other advantages accrue as he points out. I had some crummy rotary encoders that def benefited from the denouncing.

Save interrupts for when you just can't not.

a7