I have a rotary encoder which seems to be working fine when tested with a multimeter. 5v, 0v, 5v, 0v, .... But the funny thing is it's consistent when going anticlockwise but occasionally non-responsive or causes negative values when going clockwise. Like sometimes it'll be at say 50 and one click clockwise should give 53 but it gives 47 instead.
Post the datasheet or brand name and exact model number for the encoder, post a diagram showing how it's connected to Arduino.
Which Arduino? Post the code running on the Arduino.
I'm beginning to suspect it might be something to do with the Uno board itself. Yes, it's an Uno.
In another situation where I connected an analog pot to the same board, the 5v header outputs 5v when tested but when connected to a pot, it barely reaches 3v. I've tried it with two pretty good quality Japanese pots.
The regulator beside the DC jack does say 5v by the way.
Finally found out why. The cause of this issue is the same as why my 10K analogue pot was acting weird too since the rotary encoder also used 10K resistors.