New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FastLED and IR #435
Comments
Ok, I just spent a bunch of time making a page and video explaining the issues between IR and neopixels, and how to make it work on teensy v3.1, ESP8266, and ESP32: |
That shirt is lit. See what I did there haha. |
@z3t0 As that comes up as an issue frequently, might be worth adding a link to readme or similar ? |
If someone could make a pr with the links in a FAQ section of the readme I'll merge. |
As requested in Arduino-IRremote#435
* Add FAQ on mixing IR and neopixels As requested in #435 * Update README.md
* Add FAQ on mixing IR and neopixels As requested in Arduino-IRremote#435 * Update README.md
This will not work with the adafruit neopixel lib because it disables interrupts altogether
If you use FastLED instead, and that one has more platform specific code. Specifically for teensy 3.1, due, and other ARM (not AVR) 32bit CPUs, it re-enables interrupts in the middle of updating pixels. Those CPUs are fast enough that they are waiting before sending the next signal to the neopixel line, and during that time, there is just enough time for the infrared ISR to run
I have tested with a teensy 3.1, and IR + neopixel, and it works fine.
My code: https://github.com/marcmerlin/Neopixel-IR
I also got it to work on ESP2866, but I'm not exactly sure how/why it works. however, one needs to use this fork of IRRemote: https://github.com/markszabo/IRremoteESP8266
ESP32 will also work because it can talk to neopixels using the RMT hardware support which works independently from the CPU and therefore does not require interrupts to be ever stopped.
On ESP32, you should use https://github.com/MartyMacGyver/ESP32-Digital-RGB-LED-Drivers for neopixels since they're not supported in fastLED. This works fine at the same time than IRRemote
The text was updated successfully, but these errors were encountered: