I could not get the flicker to stop on a ESP8266 with arduinoOTA wifi enabled until I followed the advice of a github post. I tried the wait_time to 9-18, I tried the FASTLED_ALLOW_INTERRUPTS 0, I could not get the flicker to leave my pixels on a 150 foot string with 150 pixels. The flicker was random pixels too, all throughout the string, not just at the end. I noticed green more than anything else, and the flicker would be random changes in the brightness, and sometimes a color change. The patern was static, repeatedly calling the show function every second created different patterns though. So I took the advice of a fellow github member and implemented the spi function in the 8266 from another library.
If you search for dersimn, you will see a post discussing adding the neopixelbus library for the output only. Its about 15 lines of code that are understandable. In a nutshell, you take the led light array that is created by fastled library and copy that to the led light array that neopixelbus looks at, then instead of using the “FastLED.show();”, you use the Neopixelbus show command “strip.show();”. @dersimn has done all the hard work for us and here is his writeup below as well as a link to the original post:
--------------------------------------------------------------------------------------------------------------
@dersimn writes in part:
The NeoPixel library will work fine, with the small restriction that you won’t be able to use Serial input anymore, since GPIO3 is the same pin as RXD0.
I ended up replacing just the output procedure by the NeoPixel library, since the FastLED has some pretty cool and easy features for animation.
So starting from a working FastLED-based code, just alter the parts from something like this
void setup() {
// …
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
// …
FastLED.show();
FastLED.delay(1000/FRAMES_PER_SECOND);
}
to
#include <NeoPixelBus.h>
NeoPixelBus<NeoGrbFeature, NeoEsp8266Dma800KbpsMethod> strip(NUM_LEDS);
// …
void setup() {
// …
strip.Begin();
strip.Show(); // Set to black (^= off) after reset
}
void loop() {
// …
static uint32_t fireTimer;
if (millis() > fireTimer + 1000 / FRAMES_PER_SECOND)
{
fireTimer = millis();
RgbColor pixel;
for (int i = 0; i < NUM_LEDS; i++)
{
pixel = RgbColor(leds[i].r, leds[i].g, leds[i].b);
strip.SetPixelColor(i, pixel);
}
strip.Show();
}
}
assuming you defined the leds array like this CRGB leds[NUM_LEDS];