© Neil Cameron 2019
Neil CameronArduino Appliedhttps://doi.org/10.1007/978-1-4842-3960-5_9

9. Rotary Encoder

Neil Cameron1 
(1)
Edinburgh, UK
 

../images/471900_1_En_9_Chapter/471900_1_En_9_Figa_HTML.jpgA rotary encoder is used to finely control an output, such as the rotation of a motor, the cursor position on a screen or simply the brightness of an LED. Rotary encoders are used as control switches, such as on audio equipment. The rotary encoder has 20 positions, but the rotor can be continuously rotated either forward or backward to increase or decrease a control variable.

There are three pins inside a rotary encoder: a common pin and two pins, termed A and B, which are offset. As the rotor turns, pins A and ...

Get Arduino Applied: Comprehensive Projects for Everyday Electronics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.