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
I know that the developments of FastLED on the ESP8266 are probably still experimental but here's something I ran into.
I'm using a Wemos D1 ESP8266 breakout in Arduino 1.6.8, using the version 2.2.0 ESP8266 board definitions. The data pin of the WS2812B strip is in port D2 of the Wemos D1 (which maps to GPIO4 on the ESP8266).
I have a 5v WS2812B strip of 30 leds but just to fool around with my program I had only 5 in use in my Arduino program. I noticed that the first 5 leds will eventually 'bleed through' to the next 5, and there it stops bleeding through, ie it won't hop on to the next 5. It appears to be clocked through verbatim, so led 6 will be the same as led 1, led 7 the same as led 2, etc.
Anything particular I could do to fix this? I've tried different ways of defining pin order (ie RAW_PIN_ORDER or D1_PIN_ORDER) and tried different pins on the ESP8266 too.
Incidentally I tried the NeoPixel library just to compare and it works on the ESP8266 and doesn't exhibit this bleeding through error. Surprised it works on the ESP8266. Anyway, just wanted to mention that to share all that I've done.
It might be a case of writing to the leds too quickly - so when writing a frame instead of leds[0] being read by the first led the data is still getting passed through the chain. It's also possible that the code I have for catching/working woth interrupts is rewriting frames too quickly. (The neopixel library fully blocks interrupts (which also means it doesn't bother with attempting to rewrite the frame if necessary because of an interrupt). I'm traveling right now and won't be able to really look at this until Tuesday.
Well it's not blocking my project at all so no rush on my behalf. Just
posted it for the heads up. Thanks for taking the time to look at this.
Only recently found FastLED and I'm amazed at what the project has pulled
off, great work!
@bombarie try pulling master@head - I made a couple changes that might help with the bleeding that you're seeing.
It's a side effect of work that I've done to allow interrupts - if I catch that an interrupt has run too long, then I need to re-write the entire frame, or at least attempt it. If I'm not pausing long enough before starting that re-write, however, the new frame will be interpreted by the WS2812's as starting from the end of the last frame. Oops :) I've tried adjusting the timing there a little bit. Also, you can disable the interrupt retry attempts by putting:
Ok, I've fixed the leaking through issue here. Running an overnight test (this is part of something else) and should have the fix for this, and general esp8266 + interrupt issues, checked in tomorrow morning.
Thanks for fixing this issue @focalintent and apologies for not having been able to test this yet, I haven't been around my ESP8266 this week. I'll test is anyway once I do and will report if anything odd turns up.
Activity
focalintent commentedon May 29, 2016
It might be a case of writing to the leds too quickly - so when writing a frame instead of leds[0] being read by the first led the data is still getting passed through the chain. It's also possible that the code I have for catching/working woth interrupts is rewriting frames too quickly. (The neopixel library fully blocks interrupts (which also means it doesn't bother with attempting to rewrite the frame if necessary because of an interrupt). I'm traveling right now and won't be able to really look at this until Tuesday.
bombarie commentedon May 29, 2016
focalintent commentedon Jun 2, 2016
@bombarie try pulling master@head - I made a couple changes that might help with the bleeding that you're seeing.
It's a side effect of work that I've done to allow interrupts - if I catch that an interrupt has run too long, then I need to re-write the entire frame, or at least attempt it. If I'm not pausing long enough before starting that re-write, however, the new frame will be interpreted by the WS2812's as starting from the end of the last frame. Oops :) I've tried adjusting the timing there a little bit. Also, you can disable the interrupt retry attempts by putting:
before your
#include <FastLED.h>line.focalintent commentedon Jun 8, 2016
Ok, I've fixed the leaking through issue here. Running an overnight test (this is part of something else) and should have the fix for this, and general esp8266 + interrupt issues, checked in tomorrow morning.
bombarie commentedon Jun 10, 2016
Thanks for fixing this issue @focalintent and apologies for not having been able to test this yet, I haven't been around my ESP8266 this week. I'll test is anyway once I do and will report if anything odd turns up.