Closed Vyslik closed 5 months ago
There's some verbiage on the IRremote GitHub page about using that library with NeoPixels: https://github.com/Arduino-IRremote/Arduino-IRremote?tab=readme-ov-file#problems-with-neopixels-fastled-etc
As mentioned there, you might want to only run the ws2812fx.service() routine when the IR reciver is idle:
if (IR.isIdle()) {
ws2812fx.service();
}
Also, you should not be calling the ws2812fx.show() function yourself. It is called at the appropriate time within the ws2812fs.service() function.
Also, your delay(20) statement at the end of the receiveIR() function is problematic. It can cause problems with the IR libraries interrupt timer, so comment it out and see if things improve.
Having said all that, the WS2812FX lib disables interrupts for a brief time when it updates the LEDs. The more LEDs you have, the longer interrupts are disabled. The IR lib depends on interrupts, so it may not be able to tolerate updating a large number of LEDs.
Thanks, now the code works how it should, the delay is still here but the ws2812fx.service(); is in the IR.isIdle() so that's the only thing I changed. Thanks so much, I'll let this open so someone else will have the same problem.
Closing this issue as part of periodic cleanup.
Hi, I used this library to do my own LED strips under my shelf. Everything went good until the moment I tried all 60 leds at once (until this point I used 8 leds so I don't need 1m of LEDs all over my place). When I go over 20 LED diodes it interrupts my IR receiver and is decoding it wrongly (if it's FX_MODE_STATIC - it's decoding right, but when it's some effect like FX_MDOE_FIREWORK - it's messing up the decoder), it's just messing up with the HEX codes (tried more IR controllers for this, messing every controller I had at home). When it's the 8 LEDs it's alright and it decodes the HEX code right. Here is the code: