8000 Led0 flickers w/ esp8266, pacifica example, and WiFi · Issue #1080 · FastLED/FastLED · GitHub
[go: up one dir, main page]

Skip to content
Led0 flickers w/ esp8266, pacifica example, and WiFi #1080
@d-a-v

Description

@d-a-v

Whether interrupts are enabled or not, led0 flickers when WiFi is enabled.
I've read #504 and users seem to have no issue with esp8266 and WiFi.
Pacifica works well when WiFi is disabled. I have no level converter.
Here are the minimum changes to make Pacifica example flicker.

Led0 specifically flickers at least when esp8266 receives WiFi packets (tried with ping and nmap but there's "natural" trafic too).

diff --git a/examples/Pacifica/Pacifica.ino b/examples/Pacifica/Pacifica.ino
index 29ac9fc..7da3607 100644
--- a/examples/Pacifica/Pacifica.ino
+++ b/examples/Pacifica/Pacifica.ino
@@ -5,14 +5,17 @@
 //  For Dan.
 //
 
-#define FASTLED_ALLOW_INTERRUPTS 0
+#include <ESP8266WiFi.h>
+
+#define FASTLED_ALLOW_INTERRUPTS 1
+#define INTERRUPT_THRESHOLD 0
 #include <FastLED.h>
 FASTLED_USING_NAMESPACE
 
-#define DATA_PIN            3
+#define DATA_PIN            2
 #define NUM_LEDS            60
 #define MAX_POWER_MILLIAMPS 500
-#define LED_TYPE            WS2812B
+#define LED_TYPE            WS2813
 #define COLOR_ORDER         GRB
 
 //////////////////////////////////////////////////////////////////////////
@@ -20,6 +23,8 @@ FASTLED_USING_NAMESPACE
 CRGB leds[NUM_LEDS];
 
 void setup() {
+WiFi.mode(WIFI_STA);
+WiFi.begin("ssid", "psk");
   delay( 3000); // 3 second delay for boot recovery, and a moment of silence
   FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS)
         .setCorrection( TypicalLEDStrip );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0