Here is a nice tutorial on how to use rotary encoders with Arduino. Example code is included.
I wanted to use a low cost rotary encoder as an input mechanism for one of my upcoming projects and was initially bewildered by the code options available to take readings from the rotary encoder and determine how many “detents” or cycles the encoder had clicked past and in what direction.
Improved Arduino Rotary Encoder Reading – [Link]
RELATED POSTS
- 14 January, 2020 MYIR Launches STM32P1 based MYC-YA157C CPU Module
- 5 April, 2017 Making the Electronics for CDM324 – 24GHz Doppler Motion Sensor
- 6 June, 2018 Pixy 2 – Computer Vision at a Whole New Level
- 2 July, 2019 Miniature vertical side-actuated detection switches ideal for safety applications
- 17 May, 2019 System-on-Module with PolarFire FPGA at embedded world
- 22 May, 2020 World’s first fully self-contained Raspberry Pi audio HAT board with MERUS™ class D multilevel amplifier
Mike is the founder and editor of Electronics-Lab.com, an electronics engineering community/news and project sharing platform. He studied Electronics and Physics and enjoys everything that has moving electrons and fun. His interests lying on solar cells, microcontrollers and switchmode power supplies. Feel free to reach him for feedback, random tips or just to say hello :-)
view all posts by admin- 3D Printing (4)
- AI (265)
- Arduino (852)
- Audio (82)
- Basic Electronics (92)
- Books (18)
- Control (81)
- DIY (62)
- Ebay (1)
- Electronics-Lab (16)
- FPGA (121)
- GPS (72)
- Hardware (60)
- High Voltage (33)
- IC (734)
- Interface (79)
- IoT (658)
- Laser (44)
- LCD/OLED/ePaper (219)
- Led (196)
- Light (20)
- Mcu (619)
- Miscellaneous (79)
- Motor (147)
- Parts (245)
- PCB (115)
- Photovoltaic (75)
- Power (168)
- Power supply (175)
- Products (412)
- Raspberry Pi (405)
- RF (127)
- Robots (63)
- SBC (1014)
- Science (132)
- Sensor (612)
- SoC-SiP (14)
- Software (177)
- Soldering (31)
- SoM-CoM (44)
- Technology (229)
- Test Equipment (208)
- Test/Measurements (237)
- Timer (42)
- Tools (84)
- Top Stories (550)
- Uncategorized (69)
- USB (163)
- Websites (67)
- Youtube (99)
- /r/askelectronics
- /r/electronics
- 1-click BOM
- 3D ContentCentral
- Adafruit
- Adafruit Eagle Library
- Aisler
- All About Circuits
- Altium Circuit Maker
- Altium Designer
- Autodesk EAGLE
- AutoDesk Library.io
- AVRDUDE
- AVRDUDESS – A GUI for AVRDUDE
- CADENCE ALLEGRO
- CADSTAR
- Caneda
- Circuit JS
- Circuit Sandbox
- CircuitLab
- CircuitMaker
- CircuitPeople
- CometCAD
- Contextual Electronics' Getting to Blinky Tutorial
- Contextual Electronics' Shine on You Crazy KiCad
- Crowd Supply
- Design Spark PCB
- DipTrace
- DIPTRACE
- Dirty PCBs
- Eagle
- Eagle – List of ULPs everyone should know
- EasyEDA
- EasyEDA Gerber Viewer
- EASYPC
- EEVblog
- EEVBlog forum
- Electrical Engineering – Khan Academy
- Electronic Circuits and Projects
- Electronics Stack Exchange
- Electronics-Talk.com
- ElectronicsTutorials
- ElektorLabs
- Elliott Sound Products
- Embedded Lab
- Every Circuit
- EXPRESSPCB
- Eyrie.io
- Findchips
- FreeVideoLectures/Electronics
- Fritzing
- GC-Prevue
- gEDA
- Gerblook
- Gerbv
- GrabCAD
- GreatScott!
- Hackaday.io
- Hackster
- iCircuit
- Indiegogo
- Instructables
- JLCPCB
- Kerry D. Wong
- KiCAD
- KiCad Cheatsheet
- KiCad Footprint Collection
- KiCAD Gerbview
- KiCad Third-Party Tools
- KiCAD.info Forums
- Kickstarter
- KiKit – Automation for KiCAD
- Kitspace.org
- LCSC
- LibrePCB
- LTSpice
- Maker.io
- Maker.pro
- Mayhew Labs 3dpcb
- MENTOR
- Multisim
- Ngspice
- Octopart
- OemSecrets
- OrCAD
- OSH Park
- Pad2Pad
- PADS
- Part-DB
- Partkeepr
- Parts.io
- Partsbox.io
- PartSim
- PCB Shopper
- PCB123
- PCBWeb
- Pentalogix ViewMate
- Pololu
- PULSONIX
- PwnKitteh/InsanelyCheapElectronics
- Qucs
- SamacSys
- SnapEDA.com
- Sparkfun
- SparkFun Electronics Eagle Libraries
- Technoblogy
- The Signal Path
- Tindie
- traceParts
- Tracespace Viewer
- Ultra Librarian
- Upverter
- Viewplot
- Voltlog
- WIN SOURCE
- WinAVR
- Xesscorp's list of KiCAD 3rd party tools
- ZenitPCB
- ZofZPCB
Join 97,426 other subscribers