Edzelf / ESP32-Radio

Internet radio based on ESP32, VS1053 and a TFT screen.
GNU General Public License v3.0
964 stars 227 forks source link

Encoder behavior change #492

Open LarrySteward opened 2 years ago

LarrySteward commented 2 years ago

Hi Ed, great work!

I wanted to change encoder behavior from volume to preset and modified in main.cpp the lines 475 enum enc_menu_t { PRESET, VOLUME, TRACK } ; // State for rotary encoder menu 476 enc_menu_t enc_menu_mode = PRESET ; // Default is VOLUME mode

I changed order from VOLUME, PRESET, TRACK and default mode to PRESET and flashed it but the behavior is the same as before.

How can I change it? I did not find a hint in how to do it via configuration section? Thanks a lot, Larry

LarrySteward commented 2 years ago

I wanted to add 3 buttons (active low with 10k resistor) to pins12, 13, 14. I got boot problems because of flash reading errors. When I booted the ESP32 alone and plug it in afterwards to the board it was running except TFT. I removed now encoder which was on pins 25, 26, 27 and use these three for the buttons. This works for me so no need to solve the way of changing behavior of encoder.

Regards, Larry