Clarification: What kind of pins for rotary encoders?

I have a question about wiring up rotary encoders. When I did my first one, I wired the encoder pins to analog pins on my board and it seemed to work fine. I noticed in some online tutorials that digital pins were used. So I was wondering, should I always use digital I/O pins or are analog pins OK to use?

Thanks...

rfresh737: I have a question about wiring up rotary encoders. When I did my first one, I wired the encoder pins to analog pins on my board and it seemed to work fine. I noticed in some online tutorials that digital pins were used. So I was wondering, should I always use digital I/O pins or are analog pins OK to use?

Thanks...

It's a digital device so you should use digital pins. BUT all of the analog pins can be used as digital pins so you can still use those pins just use them as digital.

It depends on which Arduino you are using and the chip . Suggest you read the data sheet for the chip and find which pins you can choose from. Also note that several libraries use interrupts and you will want to avoid conflicts. Several tutorials are available to assist. Regards