This site uses cookies. By continuing, your consent is assumed. Learn more

120.9fm shares

Rotary encoder hookup


How do you hook a rotary encoder up to an arduino? Read times previous topic - next topic. I am trying to get some rotary encoders hooked up to an arduino via my breadboard. I'm following along with the Arduino playground - rotary encoders page.

I feel like I need to hook something up to ground.

But then, there are only three pins. Can somebody Rotary encoder hookup me in here? Best way to wire a standard mechanical encoder switch with a common connection is Rotary encoder hookup ground the common connections this would wire to a Arduino ground terminal and wire the a and b contacts to arduino digital input pins.

Then in your software activate the soft pull ups for those two inputs. Thank you for the response but I am still a bit stuck I am an electronics neophyte. The rotary encoder I purchased It also has two pins in the back but I gather those are for the push-button functionality. Are the A and B contacts specific pins, or can I use any of the three pins in front as the A and B contacts?

Rotary Encoder Arduino Example

Also, what are the common connections and how do I ground them? The sparkfun page has a link to the data sheet. Towards the bottom of the data sheet they show the pin out of the encoder. The middle pin of the three is the common terminal this would wire to a Rotary encoder hookup ground terminal and the outside terminals are the B and A contacts.

News feed