Reading Rotary Encoder

Hi Pololu,
I bought this motor with an encoder:

How do I read the encoder.

I have an arduino Uno. Should I use the PololuWheelEncoders class (
If so, how do I do this?

All I want to do is read the number of output shaft rotations then serial.print() this number to my computer.

That is a standard quadrature encoder, so the methods and usage examples described in the link you posted will work. However, you may have to adjust the counts per revolution to get an accurate count of complete rotations.


Since you are using an Arduino, you will probably find this Arduino page on rotary encoders helpful.

- Grant