© Warren Gay 2017

Warren Gay, Custom Raspberry Pi Interfaces, 10.1007/978-1-4842-2406-9_8

8. Rotary Encoders

Warren Gay

(1)St Catharines, Ontario, Canada

Rotary encoders are useful for conveying position input and adjustments. For example, as a tuning knob for software-defined radio (SDR), the rotary control can indicate two things related to frequency tuning.

  • When a step has occurred

  • The direction of that step

Determining these two things, the rotary encoder can adjust the tuning in the frequency band in discrete steps higher or lower. This chapter will examine the rotary encoder with the help of the economical Keyes KY-040 device and the software behind it.

Keyes KY-040 Rotary Encoder

While the device is labeled an “Arduino Rotary Encoder,” it is ...

Get Custom Raspberry Pi Interfaces: Design and build hardware interfaces for the Raspberry Pi now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.