09-06-2018, 01:13 PM
(09-06-2018, 06:43 AM)+3DRONE7 Wrote: Hi, first ever use of a rotary encoder.... connected 3.3v, GND, gpio 23, and 24.....
Config>audio> and set Rotary encoder to 'on'.... set MPD Config>volume control> software (sort of counter intuitive as an encoder is a hardware item..???? ......but only options are 'disabled' and 'software')
Encoder works but needs several turns (10+) to go from low to high.... which of the parameters in the settings box do I need to change and to what to get quicker control ?
The encoder has a push switch.... is there a gpio pin to connect to that will enable mute toggle with this ?
Thanks !
bob
Hi Bob,
I´m getting a bit deeper into your issue:
What model of rotary encoder do you use? For the KY-040 the wiring of the five pins is (with pins directing down):
left: GND
2nd left: +3.3V
mid: push switch (SW)
2nd right: data (DT)
right: clock (CLK)
Connecting SW to the proper GPIO pin should enable the push switch.
Assume you`ll ask now: What are the proper GPIO pins? I´m not sure if there are standard pins ofr rotary encoder (like for IR remote control where the standard is GPIO 18 for receive and GPIO 17 for send). You can assign any GPIO pins (pls. refer to the script examples via the links), pls. don´t forget to set the pins to pull-up. The python script on github is an excellent starting point. There you can see also how to assign the rotary pins to certain GPIO pins.
https://github.com/conradstorz/KY040/blo...r/KY040.py
Cheers, AnnaBlume