Crowbits-Encoder can convert the rotational displacement into a series of digital pulse signals.
The rotary encoder is a device to measure the rotation speed, which can convert the angular displacement and mechanical quantity of the shaft into the corresponding electrical pulse output. Single output means that the output of the rotary encoder is a set of pulses, and the dual output rotary encoder outputs two sets of A / B pulses with a phase difference of 90 degrees. These two sets of pulses can not only measure the speed but also determine the rotation direction. Therefore, the size and direction of the rotation speed can be displayed on the control to master the required rotation speed.
Connect the encoder module to the Arduino-compatible module D2\D3 port. Open the program in the encoder and download it to the UNO main board. Open the serial port and observe whether the output changes with rotation. The positive shift is big, the reverse is small. A number per cell. Restart the motherboard, the value becomes 0.