Closed dimaw closed 5 years ago
Did you use pullup resistors?
Yes, this is standard rotary encoder KY-040, resistors built in: https://ru.aliexpress.com/item/2PCS-FREE-shipping-Rotary-Encoder-Module-Brick-Sensor-Development-for-Dropshipping-KY-040/32474584136.html
Strange, if volume works the stations should also.No ideas,sorry.
What is the software version used? Do you have a lcd? No if i read your issue. the encoder change the station but the change is taken into account in 3 sec to let the user changes again. It is better with a lcd to show the station chosen before the start of the play. It seems that you click on the encoder after the station selection. So the palyer is stopped. Only the timeout select the chosen station.
Can I change this timeout without recompiling? Maybe 1 sec will better for me (without display)? I try to wait 3 or more seconds after turning, nothing happens, stations not changed, look at timestamp:
07:15:20.295 -> D (95942) addon: encoder value: -10 07:15:20.467 -> D (96142) addon: encoder value: -12 07:15:20.674 -> D (96342) addon: encoder value: -11 07:15:37.238 -> I (112902) audio_player: Buffer fill 98%, 50600 // 51200 bytes 07:15:50.872 -> D (126542) addon: encoder value: 5 07:15:51.079 -> D (126742) addon: encoder value: 18 07:15:51.285 -> D (126942) addon: encoder value: 18 07:15:51.494 -> D (127142) addon: encoder value: 20 07:15:51.666 -> D (127342) addon: encoder value: 22 07:15:51.873 -> D (127542) addon: encoder value: 17 07:15:52.078 -> D (127742) addon: encoder value: -12 07:16:02.396 -> I (138072) audio_player: Buffer fill 93%, 47728 // 51200 bytes 07:16:17.067 -> D (152742) addon: START/STOP State: 1 07:16:17.101 -> ##CLI.STOPPED# from addon stop 07:16:17.101 -> D (152752) vs1053: Decoder vs1053 stopped.
Please turn the encoder one notch only and see what happen. The value must be 1 or -1
11:57.8: D (872747) addon: encoder value: 1 12:00.0: D (874997) decoder: Decoder stopped.
D (874997) decoder: MAD decoder stack: 496
12:01.0: I (875987) wifi: Set ps type: 2
12:01.3: I (876277) wifi: Set ps type: 2
12:01.4: I (876287) wifi: Set ps type: 1
D (876287) renderer: Renderer volume: 800 I (876287) webserver: playstationInt: 26, g_device: 25 D (876287) eeprom: saveDeviceSettings 12:01.9: D (876707) renderer: Renderer volume: 800 12:01.9: I (876717) webclient: watermark : 3bc 956 I (876717) webclient: Webclient socket: 61, errno: 0 12:02.5: D (877327) webclient: contentType: 5 12:02.6: ##CLI.ICY0#: RFM Thematique 2 12:02.7: ##CLI.ICY3#: http:\/\/www.rfm.fr 12:02.8: ##CLI.ICY4#: Radio 12:02.9: ##CLI.ICY5#: 128 12:03.0: ##CLI.ICY6#: RFM Thematique 2 12:03.1: ##CLI.ICY7#: bitrate=128 D (877927) webclient: t1: 0x3ffc3078, cstatus: 2, icyfound: 1 metad:16000 Metaint:16000
D (877927) webclient: newlen: 844 len: 1436 chunked:0 pdata:3ffc2e2c 12:03.3: D (878127) renderer: Renderer volume: 800
One second or 3 or ten or anything else, without display it is unusable without the display. You cannot be sure of the station you select. Use the android application or the web interface.
Understood thanks. In the terminal I set the type of display "0":
sys.lcd("0")
and now the encoder works in mode “1” correctly (in real the display is not connected).
Please provide in the next version the ability to change the timeout in the configuration file. This is useful for those who do not have a display.
Right. When type is 255, it doesn't work. I will modify the code to allow it to work. Thanks.
I have configuration: esp32s + vs1053 + encoder in "1" mode (the station control and volume change when pushed and held), without display. Flashed KaraDio32 V1.9 R4. When I push and rotate volume is changed ok. But if I rotate only, stations not changes. In my config file (standard_adb.csv):
In logs all ok: