Recently, I brought a N20 6V 30rpm pololu dc geared motor from here-
And to test the encoder I used the code from this link of the same website.
The issue is, the encoder value just keeps oscillating between 0 & 1 . It neither decreases or increases in response to manually rotating the encoder wheel or programatically rotating the motor.
I have warped around this issue for days now. Am I missing any detail here?