Edzelf / ESP32-Radio

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

KY040 und IR Control? #17

Open djuscha opened 7 years ago

djuscha commented 7 years ago

Can one connect KY040 and IR remote control?

Edzelf commented 7 years ago

I don't know what a KY040 is. There is currently no support fo IR remote control.

djuscha commented 7 years ago

KY040 is 360 Rotary Encoder Module Brick Sensor Development https://ru.aliexpress.com/item/360-Degree-Rotary-Encoder-Module-Rotary-Code-Module-Encoder-Brick-Sensor-Development-Board-KY-040-Count/32629616836.html?spm=2114.10010208.1000016.1.36Vagi&isOrigTitle=true

Is the planned IR remote control or not at all?

koskee commented 7 years ago

Although more features is always going to be better, personally I don't think it would necessarily be worth the time invested for the IR remote. The radio already has the web interface, which is quite easily accessible with any phone or tablet - I personally have my phone within arms reach pretty much 24/7 so it's never been a problem. Not to mention, controlling over WiFi doesn't require line of sight, so I can turn mine off after I've already left and gotten into my vehicle outside, for example.

Also, IR requires fairly strict timings for proper communication if I recall correctly (unless the task was delegated to an external module of course, but this adds physical bulk to the system). The required frequency (40-50khz, don't remember exact number) might not play nice since the mcu already has a decent sized task between filling/transferring data to/from the ringbuf fer and hosting a webserver.

It's not a bad idea, and if you could turn off the either the webserver or the IR, it should be able to keep up in that case.. It's just that I don't think too many people would be keen on adding another remote to the collection on their coffee table. The technology seems a bit dated Imo.

That being said, if you have the time and/or skills to implement such a feature, I say go for it.

OTOH, I had considered the rotary encoder myself, I think that would be beneficial (cut down on necessary buttons for physical control)

djuscha commented 7 years ago

Understand :), but encoder would be super :) In my opinion, encoder is much better and faster than the buttons

Edzelf commented 7 years ago

IR interface is implemented now.

djuscha commented 7 years ago

:))

djuscha commented 7 years ago

And how is it connected? PDF not yet available :(

Edzelf commented 7 years ago

Forgot to upload it. Fixed.

djuscha commented 7 years ago

When I write in the config Ir_40BF = upvolume = 2 Ir_C03F = downvolume = 2 Ir_1F6B = mute

Is in debug log

D: writeprefs ir_8A31 = uppreset = 1 D: writeprefs ir_719A = station = us1.internet-radio.com:8105 D: writeprefs ir_1F6B = mute D: End of writing preferences   After the save and restart is the stored is no longer there? That was yes and if I press buttons does not happen in the log? what am I doing wrong?

Edzelf commented 7 years ago

Try lowercase. No need for restart.

djuscha commented 7 years ago

Do you mean that? ir_40bf = upvolume = 2 ir_c03f = downvolume = 2 ir_1f6b = mute

log D: writeprefs ir_40bf = upvolume = 2 D: writeprefs ir_c03f = downvolume = 2 D: writeprefs ir_1f6b = mute D: HTTP input shorter than expected D: End of writing preferences

Is the same .. after save and restart everything away I also find nothing in the scatch over IR :(

define IR 35 ?!

Edzelf commented 7 years ago

No, like ir_1AB6 = Helpme. I will check it. Check if you can change other preferences, for example "volume". This works for me: ir_40BF = upvolume = 2 ir_AAAA = Help me ir_C03F = downvolume = 2

Edzelf commented 7 years ago

Uploaded last version. IR should work now. Improved MP3 player.

djuscha commented 7 years ago

Now everything is wonderful. Everything works! Thank you very much Have the with IR receiver TSOP4838 and with the set tried, both was ok. https://ru.aliexpress.com/item/Hot-Selling-1pcs-New-Infrared-IR-Wireless-Remote-Control-Module-Kits-For-Arduino-Wholesale/32334118062.html?spm=2114.10010208.1000016.1.PQryai&isOrigTitle=true Now I'm waiting for integration of the encoder :)

Edzelf commented 7 years ago

What would you like to with (one?) encoder?

djuscha commented 7 years ago

Switch Radiosender, stop / play and volume control. Rotate, volume.Click in Sender mode and double-click stop and play.

Edzelf commented 7 years ago

I ordered some encoders.

djuscha commented 7 years ago

👍 👍 👍

djuscha commented 7 years ago

I have that made with Termite simply connected with USB with computer and buttons at the remote Control actuated

https://www.compuphase.com/software_termite.htm

Von: Gabriel Huang [mailto:notifications@github.com] Gesendet: Sonntag, 2. Juli 2017 08:38 An: Edzelf/ESP32-Radio ESP32-Radio@noreply.github.com Cc: djuscha ASDjuscha@t-online.de; Author author@noreply.github.com Betreff: Re: [Edzelf/ESP32-Radio] KY040 und IR Control? (#17)

No where to found any IR related code, Did you not yet committed?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Edzelf/ESP32-Radio/issues/17#issuecomment-312474018 , or mute the thread https://github.com/notifications/unsubscribe-auth/ASnG5ZZltfC0eZYIZCIgC7Vxh7MV5mj4ks5sJzqzgaJpZM4OBLMf . https://github.com/notifications/beacon/ASnG5agzVC9Fs4Jwgy6bRgpDyCgVd7sZks5sJzqzgaJpZM4OBLMf.gif

Edzelf commented 7 years ago

Serial monitor in Arduino IDE will do as well.

Edzelf commented 7 years ago

Rotary encoder is implemented now. See documentation for functional description.

lonelyjack commented 7 years ago

How can i activate ecncoder? Uploaded new software, there's white/gray screen, uploaded previous version - all is OK tried several times

Edzelf commented 7 years ago

See the documentation under "Preferences". I used:

ir_pin = 35                                       # GPIO Pin number for IR receiver VS1838B
vs_cs = 5                                         # GPIO Pin number for VS1053 "CS"
vs_dcs = 16                                       # GPIO Pin number for VS1053 "DCS"
vs_dreq = 4                                       # GPIO Pin number for VS1053 "DREQ"
tft_cs = 15                                       # GPIO Pin number for TFT "CS"
tft_dc = 2                                        # GPIO Pin number for TFT "DC"
enc_clk = 25                                      # GPIO Pin number for rotary encoder "CLK"
enc_dt = 26                                       # GPIO Pin number for rotary encoder "DT"
enc_sw = 27                                       # GPIO Pin number for rotary encoder "SW"
sd_cs = 21                                        # GPIO Pin number for SD card "CS"
djuscha commented 7 years ago

Rotary Encoder Works great! Thanks!!!