2) I don't think the encoders in the picture are direction sensing (Quadrature). You need an encoder with two output signals, out of phase with each other.
1) With a quadrature signal (phase a and phase b, offset by 90 degrees) you can tell direction by watching which phase goes high first. Count pulse for distance, just like you are doing now. Google quadrature encoder ...all kinds of info available
You can get "absolute" encoders, which give a unique bit pattern for each position of rotation. I think there are some encoders which give a step and direction signal also, but I might be thinking of stepper drivers!
Bookmarks