Volumio 2 plugin to configure two simple rotary encoders.
- A lot of HATs use GPIO 17, don't use it for the encoder when this is the case!
- The click requires pullup for that specific GPIO pin, the encoder will just compare the previous values and shouldn't require pullup or -down
- Connect your rotary encoder(s) and write down the pins you have used
- CLK = pin A
- DT = pin B
The rest of the pins is self explanatory.
- Install the plugin
- Configure your encoder(s) using the pins you wrote down.
- Configure CLK to 0 (zero) to disable the encoder
- Configure SW to 0 (zero) to disable the (push) button on the encoder
- Choose your logic (default (gray coding) or 4x speed, which decreases sensitivity by 25%)
Should you encounter any problems with the encoder try the following:
- Add HW (hardware) debouncing; I've ordered 0.1uF capacitors to place between CLK and GND and/or DT and GND
- Try other rotary logic; I've tried to minimize the amount of double reads for my KY040 encoder, now the default gray coding should work, otherwise try the 4x speed setting.
I'd advise to use HW debouncing as most people seem to have solved their problems using that solution.