You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
i recently made a ceiling light with ws2811 leds, but theres one little problem..
The first and last LED show the wrong color, and not only the wrong one, they only show green and blue.
I made a video to demonstrate the issue. You can clearly see, that the first led turns blue, when blue is near the end of the strip. Its like it gets the color from the wrong spot, if that makes sense.
When i up the NUM_LEDS count by one, i can workaround the issue for the last led, because it would show up on the new non existing last one. But i cant do that with the first LED.
What version of the library are you using? There was an old off by one error in the ws2812 output code on avr - but that was a long time ago. Also is the nano you're using running at 5v or 3.3v? I have sometimes seen issues with WS2811's where some data gets lost, usually related to poor level shifting.
I can confirm that esp8266s pins output 3.3V. With my WS2812B, it sometimes worked fine, but sometimes LED strip couldn't figure where byte stream starts and all colors got shifted by one. Buying Logic level converter from 3.3V to 5V solved this particular issue for me. (I still have other problems with esp8266 and WS2812B.)
Im actually using a level shifter now.
I had to because i got flickering problems with my 235 WS2811 and with 70+ of WS2812B.
But the shifted start still remails. Isnt there a way to "sync" the first and last LED ?
Yes they can.
I got them on white atm, no difference what so ever.
The main problem really is the "shifted start point".
The last LED is basically the first one showing the pattern.
But the first LED is the first wired up to the esp.
I dont have this problem with other libraries, only FastLED.
3.1.6 is fairly old at this point - you should grab the most recent version and see if that fixes the problem. Also your pastebin has expired so I can’t see what the code is that you have.
Closing as not reproducible — this is a 2018 report against FastLED 3.1.6/3.2.1 with both reproduction links now dead (the pastebin expired while the thread was still active, and @focalintent said as much at the time). Current FastLED is many major versions past it, and there's nothing here that can be verified or fixed as written.
Writing down what the thread established, since the symptom is common and this issue still turns up in searches.
The symptom was a one-position frame shift, not a color-mapping bug. @xcruell described it precisely: "the last LED is basically the first one showing the pattern," and bumping NUM_LEDS by one moved the artifact off the end. That is the strip mis-framing the data stream — pixel data landing one position off — rather than FastLED computing wrong colors.
Causes worth checking, roughly in order:
Level shifting. WS2811/WS2812 want a data line near their supply voltage. A 3.3 V MCU driving a 5 V strip is marginal, and @peter-vasut confirmed in this very thread that a 3.3→5 V shifter fixed exactly this shifted-by-one symptom. @xcruell added one and it helped the flickering but not the shift, which points elsewhere — but it remains the first thing to rule out.
Reset/latch gap. The strip re-frames on a long LOW. If that gap is too short — usually from something else on the bus, or an interrupt landing mid-frame — the strip never resynchronises and every pixel sits one slot off. On ESP8266/ESP32 specifically, see the Interrupt problems page @focalintent linked.
WS2811 drives three LEDs per chip. If the physical strip groups LEDs in threes, the mapping between "LED index" and "physical LED" is not 1:1, and off-by-one reasoning gets confusing fast. Worth confirming which variant is in hand.
First-pixel signal integrity. The first pixel sees the rawest edge on the whole bus. A ~200-330 Ω series resistor at the data pin and a short lead help; a long unterminated run into pixel 1 does not.
@xcruell's "I don't have this problem with other libraries" is the one loose end nobody chased, and it's the detail that would have made this actionable. Different libraries use different reset gaps and edge timings, so a strip that is marginal on one can be stable on another — which is consistent with a signal-integrity or latch-timing problem rather than a FastLED logic error, but nobody proved it either way.
If you still see this on a current FastLED, please open a fresh issue with the FastLED version, board, chipset, LED count, whether a level shifter is in use, and a sketch pasted inline rather than linked — links rot, as this thread demonstrates. That'll get a real diagnosis instead of a seven-year-old thread.
Activity
focalintent commentedon Mar 24, 2018
What version of the library are you using? There was an old off by one error in the ws2812 output code on avr - but that was a long time ago. Also is the nano you're using running at 5v or 3.3v? I have sometimes seen issues with WS2811's where some data gets lost, usually related to poor level shifting.
As for the esp8266/32 - have you tried adjusting whether or not interrupts are allowed or the retry count - https://github.com/FastLED/FastLED/wiki/Interrupt-problems
xcruell commentedon Mar 24, 2018
Hey!
Im using 3.1.6. My Nano is running at 5v.
Maybe thats the issue with the esp8266, since the digital pins output 3.3v.
I tried both, allow interrupts and retry count without success on the esp.
peter-vasut commentedon Oct 3, 2018
I can confirm that esp8266s pins output 3.3V. With my WS2812B, it sometimes worked fine, but sometimes LED strip couldn't figure where byte stream starts and all colors got shifted by one. Buying Logic level converter from 3.3V to 5V solved this particular issue for me. (I still have other problems with esp8266 and WS2812B.)
xcruell commentedon Oct 5, 2018
Im actually using a level shifter now.
I had to because i got flickering problems with my 235 WS2811 and with 70+ of WS2812B.
But the shifted start still remails. Isnt there a way to "sync" the first and last LED ?
Blink515 commentedon Oct 5, 2018
xcruell commentedon Oct 5, 2018
Yes they can.
I got them on white atm, no difference what so ever.
The main problem really is the "shifted start point".
The last LED is basically the first one showing the pattern.
But the first LED is the first wired up to the esp.
I dont have this problem with other libraries, only FastLED.
focalintent commentedon Oct 5, 2018
3.1.6 is fairly old at this point - you should grab the most recent version and see if that fixes the problem. Also your pastebin has expired so I can’t see what the code is that you have.
xcruell commentedon Oct 5, 2018
Im using 3.2.1 and a different code by now.
https://pastebin.com/LD4j48CA
regards
Ugly bug fix for red light not showing when index = 0 in Versus
chore(deps): bump fbuild 2.2.27 -> 2.2.28 (PyPI 2026-06-15) (#3056)
zackees commentedon Aug 1, 2026
Closing as not reproducible — this is a 2018 report against FastLED 3.1.6/3.2.1 with both reproduction links now dead (the pastebin expired while the thread was still active, and @focalintent said as much at the time). Current FastLED is many major versions past it, and there's nothing here that can be verified or fixed as written.
Writing down what the thread established, since the symptom is common and this issue still turns up in searches.
The symptom was a one-position frame shift, not a color-mapping bug. @xcruell described it precisely: "the last LED is basically the first one showing the pattern," and bumping
NUM_LEDSby one moved the artifact off the end. That is the strip mis-framing the data stream — pixel data landing one position off — rather than FastLED computing wrong colors.Causes worth checking, roughly in order:
Level shifting. WS2811/WS2812 want a data line near their supply voltage. A 3.3 V MCU driving a 5 V strip is marginal, and @peter-vasut confirmed in this very thread that a 3.3→5 V shifter fixed exactly this shifted-by-one symptom. @xcruell added one and it helped the flickering but not the shift, which points elsewhere — but it remains the first thing to rule out.
Reset/latch gap. The strip re-frames on a long LOW. If that gap is too short — usually from something else on the bus, or an interrupt landing mid-frame — the strip never resynchronises and every pixel sits one slot off. On ESP8266/ESP32 specifically, see the Interrupt problems page @focalintent linked.
WS2811 drives three LEDs per chip. If the physical strip groups LEDs in threes, the mapping between "LED index" and "physical LED" is not 1:1, and off-by-one reasoning gets confusing fast. Worth confirming which variant is in hand.
First-pixel signal integrity. The first pixel sees the rawest edge on the whole bus. A ~200-330 Ω series resistor at the data pin and a short lead help; a long unterminated run into pixel 1 does not.
@xcruell's "I don't have this problem with other libraries" is the one loose end nobody chased, and it's the detail that would have made this actionable. Different libraries use different reset gaps and edge timings, so a strip that is marginal on one can be stable on another — which is consistent with a signal-integrity or latch-timing problem rather than a FastLED logic error, but nobody proved it either way.
If you still see this on a current FastLED, please open a fresh issue with the FastLED version, board, chipset, LED count, whether a level shifter is in use, and a sketch pasted inline rather than linked — links rot, as this thread demonstrates. That'll get a real diagnosis instead of a seven-year-old thread.
Thanks @peter-vasut and @Blink515 for the diagnostics, and @focalintent for the original triage.