Has anyone found a work around for the NeoPixel(ws2812b) and IRremote library timing/interrupt issue when running patterns? I don't want to add an extra chip or arduino so I was just curious. I was able to kinda do a hack by looking for garbage coming from the remote and releasing the pattern when it sees it, but that requires an extra button push and isn't a very clean way of handling the issue.
I have seen it suggested that you have to get rid of the loop, but I am not that experienced in programming.
Any thoughts or samples would be greatly appreciated. I would also be open to using different libraries if someone has had success with this.
I have seen it suggested that you have to get rid of the loop
Getting rid of the loop() wouldn't be a good idea, if you want the code to compile. If you mean some other loop, you need to be a lot more specific, starting with posting your code.
I guess moving it outside of the LED loop would have been a better way to explain it. I will try to post up my code when I get a minute. Probably won't be the whole code, but I will include the part that matters.
jman31:
Has anyone found a work around for the NeoPixel(ws2812b) and IRremote library timing/interrupt issue when running patterns?
Ws2812b LEDs can only be updated while the interrupts are disabled.
IR remote codes can only be updated while the interrupts are enabled.
So what?
The only way to receive IR codes while using WS2812 is to provide pauses between all the strip.show() commands, that are long enough to receive the IR transmission in full length.
If you want to do strip.show(); and strip.show(); and strip.show(); all the time, then the interrupts are blocked all the time and you cannot receive IR code.
If you want to drive LEDs without disabling interrupts during strip.show();, you better use WS2801 LEDs instead, and NOT WS2812 LEDs!
jurs:
Ws2812b LEDs can only be updated while the interrupts are disabled.
IR remote codes can only be updated while the interrupts are enabled.
So what?
The only way to receive IR codes while using WS2812 is to provide pauses between all the strip.show() commands, that are long enough to receive the IR transmission in full length.
If you want to do strip.show(); and strip.show(); and strip.show(); all the time, then the interrupts are blocked all the time and you cannot receive IR code.
If you want to drive LEDs without disabling interrupts during strip.show();, you better use WS2801 LEDs instead, and NOT WS2812 LEDs!
Thanks for a thoughtful and relevant response! That's kinda what I thought, but I was checking to see if someone had either come up with a new library or had thoughts on a way around it.