Wi-Fi Acces Point + FastLED = Impossible ?

vivi32
Posts: 1
Joined: Sun Sep 20, 2020 8:34 pm

Wi-Fi Acces Point + FastLED = Impossible ?

Postby vivi32 » Sun Sep 20, 2020 9:10 pm

Hello, i`m new on ESP32 and i start to write project with esp32 + AP + WS2811 LED stripe
I`m do it many times, with esp8266, nano, mega, etc.... and all was ok
But with ESP32 when i`m add just one line with AP initialization - LEDS go to flickering.
Whole of day i tried several ways to fix it like some defines, multicore, different leds libraries and forks.... but no result
Please help me, i just dont know where to find answer for now.
Thank you & sorry for my english!

IDE: Arduino IDE
Board: WEMOS D1 ESP-WROOM-32
ESP32 Core: 1.0.4
FastLED: 3.3.3


Minimal code to get flickering:

Code: Select all

#include "WiFi.h"
#include "FastLED.h"


#define DATA_PIN 22
#define LEDS_COUNT 24
#define LEDS_BRIGHT 42
#define MODULE_SSID "TEST_SSID"
#define MODULE_PASS "testpassword"

struct CRGB OLED_1[LEDS_COUNT];


void setup() {
  Serial.begin(115200); 
  
  LEDS.addLeds<WS2811, DATA_PIN, GRB>(OLED_1, LEDS_COUNT).setCorrection(TypicalLEDStrip);
  LEDS.setBrightness(LEDS_BRIGHT);

  xTaskCreatePinnedToCore(LedsTask, "LedsTask", 10000, NULL, 1, NULL,  0);

  // ALL LEDS WORKS PERFECT WHEN LINE BELOW IS COMMENTED
  if(!WiFi.softAP(MODULE_SSID, MODULE_PASS)){Serial.println("INIT AP: FAILED");}
}


void loop() {
  Serial.print("Message from core #"); Serial.println(xPortGetCoreID());
  delay(4000);
}


void LedsTask( void * pvParameters ){
  static int color = 0;
  for(;;){
    Serial.print("Message from core #"); Serial.println(xPortGetCoreID());
    for (int i=0;i<LEDS_COUNT;i++){
      OLED_1[i].setHSV(color, 255, 255); 
      LEDS.show(); delay(50);
    }

    color = color + 32 >= 255 ? 0 : color + 32;
    delay(100);
  } 
}

BatsIhor
Posts: 1
Joined: Fri Oct 02, 2020 2:12 pm

Re: Wi-Fi Acces Point + FastLED = Impossible ?

Postby BatsIhor » Fri Oct 02, 2020 2:35 pm

Hey,

I have the same problem and it's not easy to fix if possible at all but as of today I used FastLED, NeoPixel, NeoPixelBus libraries and all of them flicker.
What I partially tried is running on separate core but have to work on it a bit more as it just partially removed flickering I still have it from time to time.

Also I found this projects on github that claim to be working on ESP32:
https://github.com/CalinRadoni/ESP32DLEDController
https://github.com/PerMalmberg/Smooth/b ... RGBLed.cpp
https://github.com/kitesurfer1404/WS281 ... _esp32.ino

So that is something I'm going to check next.

Who is online

Users browsing this forum: No registered users and 3 guests