-
Notifications
You must be signed in to change notification settings - Fork 348
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
LED flickering with random color (ESP32) #223
Comments
The ESP32 is notoriously picky when it comes to WS2812 LEDs. You'd think that with two cores, one for your sketch and one to manage WiFi, it would be more robust than an ESP8266, but not so (at least in my experience). When developing LED sketches on the ESP32, I've never been able to pin a task to one core and have it work properly. Even without monkeying with pinning tasks to cores, you get the weird LED flashing issue as discussed in issue #177. I would recommend you start with the ws2812fx_esp32 example sketch, which uses the ESP32's RMT hardware (instead of bit-banging) to fix the weird flashing LED issue. |
Thx, it is working now |
I'm going to leave this issue open for a while, since this issue regarding the ESP32 comes up pretty regularly. |
I'm using ESP-IDF, and pinning the task that runs ws2812fx.service() to Core 1 fixed my issue. |
I'd be interested in seeing your code, if you don't mind posting it. |
I'm using ESP-IDF, so I'm not sure if it helps. But I create a task with;
And then within that task, I just call
|
Hmmm, I'm not sure why your code snippet would fix your issue. You're pinning the service() function to core 1, which is the core it would normally run on when using the Arduino IDE. Strange. But I'm glad you got it working. |
This is still a problem. If you have multiple things going on (multiple xtaskcreates) it wont fix it if you have it pinned. |
Dear all, xTaskCreate(&blink_led_task, "blink_led_task", 1024 * 10, NULL, 5, NULL); I am using above function to create the task... for (j = 0; j < (CONFIG_EXAMPLE_STRIP_LED_NUMBER - 4); j++) when above code executes...led flickering issue with random colors occurs... |
Hmmmm...it doesn't look like you're using the WS2812FX lib. You might have better luck posting your question to a forum that deals with ESP32 RMT issues in general. |
ok thanks for the guidance...
…On Thu, Dec 15, 2022 at 5:26 PM Keith Lord ***@***.***> wrote:
Hmmmm...it doesn't look like you're using the WS2812FX lib. You might have
better luck posting your question to a forum that deals with ESP32 RMT
issues in general.
—
Reply to this email directly, view it on GitHub
<#223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4MDXHCPIYEYN2CB7KVRDLDWNMBQPANCNFSM4NHAU5FA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hey there,
i have a strange problem with the WS2812FX, the LEDs are flickering with random color. I am using a ESP32 and LED Strip WS2812B. Does anyone know what is wrong?
Video: https://photos.app.goo.gl/dvYWKH25gqZrmHNW8
Code:
`#include <WS2812FX.h>
#define LED_COUNT 56
#define LED_PIN 12
WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
ws2812fx.init();
ws2812fx.setColor(255,0,0);
ws2812fx.setMode(2);
ws2812fx.setSpeed(1000);
ws2812fx.start();
}
void loop() {
ws2812fx.service();
}`
The text was updated successfully, but these errors were encountered: