Skip to content

KY-040 rotary encoder library for arduino and esp8266 devices

License

Notifications You must be signed in to change notification settings

dmachard/KY040-rotary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HW-040/KY-040 Rotary Encoder Library

KY-040 rotary encoder library for Arduino and ESP8266 devices.

Features

  • Callback functions on click and rotate events
  • Software debouncing
  • Interrupts support

Tested on hardware

  • Arduino Uno
  • Wemos D1 R2

Wiring

The wiring for UNO/ESP8266 can be as follows :

  • Vcc --> 3.3V
  • GND --> Ground
  • SW --> D7
  • DT --> D6
  • CLK --> D5

Sample code

Read the *.ino file