Rs. 160 - In stock - SKU ABH-MISC-0652 - Brand Generic
A KY-040 rotary encoder module with 20 detents per turn, endless 360 degree rotation and a built-in push button, for menus and digital knobs.
Delivery anywhere in Pakistan for a flat Rs. 250 paid in advance, product price Cash on Delivery. 7-Day Checking Warranty.
| Operating Voltage | 5V |
|---|---|
| Pulses/Rev | 20 |
| Notes | Continuous 360° Rotation + Integrated Push Button |
Unlike a potentiometer, an encoder turns endlessly and sends pulses on two pins (CLK and DT) as it rotates. The order of the pulses shows direction. Pressing the shaft closes a switch (SW).
Connect CLK, DT and SW to digital pins and read them with an encoder library or interrupts. Common uses: menu navigation with an LCD or OLED, volume and frequency knobs.
Add small capacitors or software debouncing if counts skip.
A potentiometer has a fixed range and gives an analog value. An encoder turns forever and gives digital pulses.
Contact bounce. Use interrupts with debouncing or an encoder library.
Yes, press the shaft.