ESP8266-Websockets-LED icon indicating copy to clipboard operation
ESP8266-Websockets-LED copied to clipboard

Changing colors from color picker affects only the first LED.

Open DDoykov opened this issue 2 years ago • 3 comments

Hello, I am using ESP8266 WEMOS D1 MINI PRO , that is controlling 17 LED WS2812B. I had a problem when i try to pick any color from color picker. The problem is that color change only applies to the first LED, and even then, the color is not the one i choose. If i try to pick another color, sometimes all the leds are refreshed. The problem is present in effects, but its not noticeable.

The solution was to put two LEDS.show(); and two FastLED.show(); one after another both in ESP8266-LED.ino and effects.ino.

EXAMPLE:

      for (int i = 0; i < LED_COUNT; i++) {
        leds[i].setRGB(r,g,b);
      }
      LEDS.show();
      LEDS.show(); // THAT ONE IS NEEDED FOR THE PROPER WORK

DDoykov avatar Feb 22 '23 09:02 DDoykov

Hi. Unfortunately I don't have wemos to test. But if it helps, then I added this line. effects.ino is not used for colorpicker.

wirekraken avatar Feb 23 '23 12:02 wirekraken

I think that the problem is not noticeable when there are frequent calls of .show();. But I SEE IT. I see the first LED glitching and that drives me NUTS. :) Thats why i doubled them too. For example if i press few times quickly same spot on color picker or brightness slider, there is no problem. I updated to 2.0 but i don't remember what was the previous version installed on the same WEMOS. I had no problems using it. When i have time i'm gonna try FASTLED examples because i think the problem lies there.

DDoykov avatar Feb 23 '23 20:02 DDoykov

Hello, So... i have tried FASTLED examples and i tried some code to simulate the problem, but unfortunately it didn't appear again. I assume that my esp8266 is the problem and will try some other board.

I shot how i try to reload the page few times for it to work. You can see the first LED glitching. https://www.youtube.com/watch?v=G9vvmqG-r80

DDoykov avatar Mar 02 '23 11:03 DDoykov