karawin / Ka-Radio32

esp32 version of Ka-Radio (https://github.com/karawin/Ka-Radio) by jp Cocatrix
525 stars 155 forks source link

3 button interface description/example #109

Closed diver321 closed 5 years ago

diver321 commented 5 years ago

Can please someone post a schema and describe how to connect (which pins and maybe resistors if needed... ) 3 button control interface (button switches keyboard) to ESP32 board - which is defined in gpio config? As an example. What i need is control (previous station button), (play/pause button), (next station button) - nothing more. Ist that even possible with this 3 button interface? How can define which button - which function? Is there somewhere a description? Thank You. BTW - great project.

karawin commented 5 years ago

see https://github.com/karawin/Ka-Radio32/blob/master/HardwareConfig.md Buttons Two set of three buttons can be configured in place or with encoder(s). The only limit is the available gpio's. Each set has functions equivalent to Encoder0 and Encoder1: click on button A: Start/Stop playing click on button B and C: volume down and up for set 0 (P_BTN0), Station down and up for set 1 (P_BTN1) held on button A: click on button B and C: volume down and up for set 1 (P_BTN1), Station down and up for set 0 (P_BTN0) A button may be active with a level of 0 volt (0) (default) or +3.3volt (1)

If a set is not used, P_BTNx_A must be set to 255. In this case P_BTNx_B P_BTNx_C are disabled too.

example of switches

switch