Rotary encoder and interrupts

Jeff009:
Ah, thanks! That solved it. I didn't know that interrupts had to be on certain pins. I guess that makes sense though.

I'm planning on building something that takes two encoders, so I'll need four pins which can handle interrupts. Can any of the other pins handle interrupts?

Thanks,

Jeff

Actually you can get by supporting two encoders using just two user interrupt pins by having each encoder use one interrupt pin and one non-interrupt pin for their two channels. You have to tweak the code a little but it can be done. An arduino mega board supports 5 user interrupt pins.

Lefty