An incremental rotary encoder requires two (microcontroller) inputs for decoding the rotational direction and speed. Three inputs are needed when it has an integrated pushbutton. In this video we show how it can be done with only one input. And not just one rotary encoder, but even two with integrated pushbuttons as well, i.e. six encoder pins connected to only one MCU pin. An Arduino example sketch shows that it really works.

The Arduino sketch and the LTspice simulation used in this video can be downloaded from the project page at Elektor Labs