Difference between revisions of "Lesson 43--Microduino Rotary encoder"
(Created page with "{{Language | 第四十三课--Microduino 旋转编码器使用}} {| style="width: 800px;" |- | ==Objective== This experiment will through Microduino to decode the rotary encod...") |
|||
Line 29: | Line 29: | ||
==Program== | ==Program== | ||
− | Download test | + | Download test program: |
https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced/Microduino_rotary_encoder | https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced/Microduino_rotary_encoder | ||
==Debug== | ==Debug== | ||
− | *Step | + | *Step 1: |
Set up the circuit follow the schematic | Set up the circuit follow the schematic | ||
[[File:rotary_encoder_Wiring-1.jpg|600px|center|thumb]] | [[File:rotary_encoder_Wiring-1.jpg|600px|center|thumb]] | ||
− | *Step | + | *Step 2: Download test program |
− | *Step | + | *Step 3: Open the test program, select the board and compile the program, then download it. |
*Configure the serial baud rate and open the serial monitor | *Configure the serial baud rate and open the serial monitor | ||
Line 53: | Line 53: | ||
==Result== | ==Result== | ||
− | According to the serial port monitor returned data to judge the state of rotary encoder. The | + | 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. |
==Video== | ==Video== | ||
|} | |} |
Latest revision as of 08:59, 12 September 2016
Language: | English • 中文 |
---|
ContentsObjectiveThis experiment will through Microduino to decode the rotary encoder, judge the movement direction and whether it was pressed. Equipment
Rotary encoderRotary encoderThis 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. Pin DiagramSchematicProgramDownload test program: https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced/Microduino_rotary_encoder Debug
Set up the circuit follow the schematic
ResultAccording to the serial port monitor returned data to judge the state of rotary encoder. The players can make other application based on this experiment. Video |