Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
15k stars 3.24k forks source link

IR does not work with non solid effect (ESP8266) #2307

Closed hoddl closed 3 years ago

hoddl commented 3 years ago

I have an IR 38key with ir.json implementation. Every key works fine while the effect is on "Solid". FP=0 or something else switch the effect to "Gradient" and the IR Remote dose not work. I wodere because FP means palette and not effect. Same when FX is used the effect changes and Remote do not work. On the WebUI switch to "Solid" and the IR work again. Some Keys are the same code as 24key RGB remote, so I tryed with the precompiled IR Remote Version and the same effect. Remote only works when Effect ist "Solid"

To Reproduce Factoryreset, LED Key =GPIO 5, IR = GPIO 4, ir.json upload from https://kno.wled.ge/interfaces/json-ir/38-key_ir.json

WLED version

blazoncek commented 3 years ago

Create your own ir.json file and experiment.

hoddl commented 3 years ago

Thank you for the answer. When the effect is diffrent than Solid, the IR do nothing, independet of ir.json. It is possible to create an ir.json for all key that work, but when the effect is change the IR do not work so it must be some thing in the IR do not receive some thing when the effect is change.

Aircoookie commented 3 years ago

Interesting, my theory would be that if an effect is running, the loop is not called often enough and the IR signal is missed (though it should be interrupt based?). Just speculation though.

@hoddl how many LEDs are you running?

hoddl commented 3 years ago

Im still testig so only 30 LEDs are runnig. Interrupt problem seems the right way but I have no Idea for a solution.

blazoncek commented 3 years ago

It does work on all my installs from ESP01, Wemos D1 Mini and ESP32. No issues there.

Aircoookie commented 3 years ago

I think LED pin 5 might make the difference here. Pin 2 is really the recommended on ESP8266 for hardware driving, 5 uses software bitbang and is thus more (too?) taxing on the CPU.

@blazoncek I don't currently have an IR tester, can you quickly test whether setting LED output to 5 causes this issue?

blazoncek commented 3 years ago

Very unlikely today, but I have a few installs where IR works on GPIO 3 and GPIO12-14.

Aircoookie commented 3 years ago

GPIO3 is also hardware, but if 12-14 work with digital LEDs (on ESP8266), no reason 5 shouldn't.

blazoncek commented 3 years ago

@hoddl build with debug flag enabled and attach USB cable and monitor serial output. When you press button on IR transmitter it should be displayed on serial output.

hoddl commented 3 years ago

@Aircoookie thank you, I change the LED PIN to GPIO2 an now it seems to work.

Sojourneer commented 7 months ago

Switching from GPIO4 to GPIO2 also worked for me, even with ESP's recommended 12K pullup on GPIO2. The refresh rate is an order of magnitude higher.