Go Down

Topic: Rotary encoder works one way but not the other. (Read 850 times) previous topic - next topic

dkathrens77

#5
Feb 08, 2012, 11:02 pm Last Edit: Feb 09, 2012, 12:37 am by dkathrens77 Reason: 1
I bet I can sound even more stupid. OK, you have realized that the center pin is not ground. Will you PLEASE tell us where you connect it, if not to ground?

I'm trying to get this to work too, and like you all I have in the way of a hookup diagram is mfr datasheets. Apparently no one in Arduino land thinks its necessary to post a hookup diagram. grr.

[later same day]

OK, updating my own post here. The problem here was me trying to use the "test circuit" from the datasheet. A and B pulled up to 5V with 10K resistors, C to ground.

None of that is needed on the Arduino, which has its own configurable internal pull up resistors. (you set it up with a command like pinMode(5, HIGH) for internal pull up) I directly connected my encoder pins A to 5, B to 6, C to gnd.
C is the middle pin! like this: ACB

(I designated 5 and 6 instead of 2 and 3 in the example code above) It works like it's supposed to. 
Any answer to any question about 'everything' must necessarily be very long and very detailed. But in short, I can safely say that 'everythi

zasf


The encoder came without any documentation and all configurations I came across online have the ground in the middle.


I had the same problem. Ground is not the middle pin but one on the side.

Paul__B


Go Up