Quadrature encoders are incremental encoders that you can use to measure
the speed and direction of a rotating shaft. They convert the angular
rotation of the shaft to digital pulses that tell you which direction the
shaft moves. By measuring the time difference between the pulses, you can
derive the speed. You can use quadrature encoders in bidirectional position
sensing and length measuring applications. You can decode quadrature signals
to use them as a sensory input to a system to determine the speed,
acceleration, and position of the rotary devices. The three types of
decoding — X1, X2, and X4 — provide 1, 2, or 4 pulses,
respectively, at each rotational cycle. X4 decoding is only supported as it
provides the highest accuracy and angular resolution.
Before you use quadrature encoder functions, create an Arduino object using arduino. For more
information, see Connect to Arduino Hardware.