82
pin 5 generate two-phase square waves whose phase difference is 90°. Usually the two-
phase square waves are called channel A and channel B as shown below:
We can see from the figure above: If channel A is in low level, and channel B converts from
high level to low, it indicates the Rotary Encoder has spun clockwise (CW). If channel A is in
low level, and channel B converts from low level to high, it indicates the Rotary Encoder has
spun counter-clockwise (CCW). Thus when channel A is in low level, we can know the
direction that Rotary Encoder spun by channel B.
The schematic diagram of the Rotary Encoder is shown as below. We can see that pin 3 on
the Rotary Encoder is CLK of the module, while pin 5 is DT. Then we can know the Rotary’s
rotating direction by the value of CLK and DT.
It is summarized by using oscilloscope to observe the output waveform of CLK and DT and
operating the rotary encoder. You can try yourself.
Содержание Super Kit 3.0
Страница 7: ...4 22 RGB LED 1 23 LED red 8 24 LED white 4 25 LED green 4 26 LED yellow 4 27 NPN Transistor S8050 2 ...
Страница 30: ...27 Also we have drawn a table of the corresponding BCM wiringPi and Name of each pins ...
Страница 78: ...75 Now pull the slide and you can see the two LEDs light up alternately ...