Introduction: Arduino - Rotary Encoder Simple Example KY-040

About: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the wide range of sensors you can use with it. I make…

Hello world! This is a example on how to use the KY-040 Rotary encoder.

Its very basic but if your new to arduino or could not find any code, then you have something to start with.

because there is little documentation about the Keyes sensor kit.

Follow the next step for the Code Schematic and Parts List.

Step 1: Schematic Code & Parts List.

Parts List.

  1. Arduino uno I used the RobotDyn Uno, a chinese copy with 7 analog pins.
  2. Rotary encoder KY-040.
  3. RGB Led KY-016 (don't need this can use any leds).
  4. Set of Jumper wires MM/FF/MF.

Good luck!