Skip to content
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

Closed
marcmerlin opened this issue Apr 10, 2017 · 5 comments
Closed

FastLED and IR #435

marcmerlin opened this issue Apr 10, 2017 · 5 comments
Assignees
Labels
Documentation Fixed by extending documentation Keep Keep issue

Comments

@marcmerlin
Copy link
Contributor

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

@z3t0 z3t0 self-assigned this Apr 10, 2017
@z3t0 z3t0 added the Documentation Fixed by extending documentation label Apr 10, 2017
@z3t0 z3t0 added this to the Better Documentation milestone Apr 10, 2017
@z3t0 z3t0 changed the title IR works in conjunction with fastled on teensy 3.1, and https://github.com/markszabo/IRremoteESP8266 can also do IR at the same time than fastled FastLED and IR Apr 10, 2017
@z3t0 z3t0 added the Fix label Apr 13, 2017
@marcmerlin
Copy link
Contributor Author

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:
http://marc.merlins.org/perso/arduino/post_2017-04-03_Arduino-328P-Uno-Teensy3_1-ESP8266-ESP32-IR-and-Neopixels.html
this short video shows how trying this on AVR is an exercise in frustration and handling failures :)
https://www.youtube.com/watch?v=62-nEJtm070

@z3t0
Copy link
Collaborator

z3t0 commented Apr 17, 2017

That shirt is lit.

See what I did there haha.

@AnalysIR
Copy link
Contributor

@z3t0 As that comes up as an issue frequently, might be worth adding a link to readme or similar ?

@marcmerlin
Copy link
Contributor Author

@AnalysIR @z3t0 you are more than welcome to take my docs, parts of it, or whatever you see fit and put it in whichever documentation makes the most sense. I did spend all the time writing this up so that others can find it and benefit if they're having the same problems :)

@z3t0
Copy link
Collaborator

z3t0 commented Apr 18, 2017

If someone could make a pr with the links in a FAQ section of the readme I'll merge.

marcmerlin added a commit to marcmerlin/Arduino-IRremote that referenced this issue Apr 22, 2017
z3t0 pushed a commit that referenced this issue Apr 23, 2017
* Add FAQ on mixing IR and neopixels

As requested in #435

* Update README.md
@ArminJo ArminJo closed this as completed Jul 3, 2020
@ArminJo ArminJo added the Keep Keep issue label Dec 30, 2022
Theaninova pushed a commit to Theaninova/Arduino-IRremote that referenced this issue Dec 2, 2023
* Add FAQ on mixing IR and neopixels

As requested in Arduino-IRremote#435

* Update README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Fixed by extending documentation Keep Keep issue
Projects
None yet
Development

No branches or pull requests

4 participants