wirekraken / ESP8266-Websockets-LED

Real-time addressable LED strip (ws2811/ws2812/ws2812b) control using ESP8266 via web interface.
GNU General Public License v3.0
68 stars 26 forks source link

Changing colors from color picker affects only the first LED. #11

Open DDoykov opened 1 year ago

DDoykov commented 1 year ago

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
wirekraken commented 1 year ago

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.

DDoykov commented 1 year ago

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 commented 1 year ago

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