Lesson 43--Microduino Rotary encoder
|Language:||English • 中文|
This experiment will through Microduino to decode the rotary encoder, judge the movement direction and whether it was pressed.
This kind of rotary encoder has turn left, turn right and press three functions. The function of the press just like we use the button. Rotate the encoder, it caan produce the pulse signal that has a different phase, which can be used to distinguish the opposite direction.
If the output 1 as the high electricity level, and a high level in output 2 too, then switch rotated as clockwise, otherwise output 2 is a low level, it must be counterclockwise.
Set up the circuit follow the schematic
According to the serial port monitor returned data to judge the state of rotary encoder. The players can make other application based on this experiment.