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

ESP8266 flickers a bit when using IR interrupt, but https://github.com/JoDaNl/esp8266_ws2812_i2s/ works #439

Closed
marcmerlin opened this issue Apr 15, 2017 · 1 comment

Comments

@marcmerlin
Copy link
Contributor

This is not a bug, just documentation for others.
When I use fastled on ESP8266, it works, but from time to time I get slight flickering when the infrared timer is active (while on teensy 3.1 it does not). I'm going to guess the IR handler is just a bit slower or less time bound on ESP8266 and causes the occasional timing glitches.

Probably nothing anyone can do with the current design (the fastled driver nicely re-enables interrupts which allow the IR handler to run), however if anyone hits this problem, there is a better solution:
https://github.com/JoDaNl/esp8266_ws2812_i2s/
This driver (ab)uses the I2S support in the chip to drive neopixels without tying up the CPU. It's not even close to having the features that FastLED has (or the same amount of LEDs supported), but for neopixels, it works and I can run my interrupt at the same time without any issues or glitches.

This issue is mostly there to serve as documentation if someone needs IR + neopixel on ESP8266.

If anyone cares, this is my fastled version.

In file included from /home/merlin/Arduino/prg/Neopixel/Neopixel-IR/Neopixel-IR.ino:33:0:
/home/merlin/Arduino/libraries/FastLED/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.003
 #    pragma message "FastLED version 3.001.003"
                     ^
In file included from /home/merlin/Arduino/libraries/FastLED/FastLED.h:65:0,
                 from /home/merlin/Arduino/prg/Neopixel/Neopixel-IR/Neopixel-IR.ino:33:
/home/merlin/Arduino/libraries/FastLED/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
@marcmerlin
Copy link
Contributor Author

This page and video explain 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants