Hi Daniel, et al.

Hi Daniel, et al. Have you folks seen this article?
http://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/

I don’t understand all the technical details but apparently he’s outlining a way to drive WS2812 without needing to block interrupts (making it possible to receive IR codes or Serial on the same chip that’s driving the LEDs). Also he’s saying he tested a ton of strip and it only takes 6us to latch rather than 50us, and it’s making the animation smoother.

Just wanted to pass this along in case its relevant for the library. Thanks!
http://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them

This is how I have it possible to enable interrupts on arm platforms. Unfortunately, on a 16mhz avr the systick interrupt alone takes long enough to run that it often blows past the reset time (especially with everything more that the library does). Since FastLED is using the gap between bits to do things like non-destructive scaling, dithering, etc… I’ve opted instead to get the timing as tight as i can, so that frames are written out in as little time as possible.

Definitely a useful article from a year or so ago for beginners trying to write their own driver for WSxxxx Neopixels.

FastLED is much more sophisticated than the simple pixel pusher code there, even just in the LED driver. We do realtime in-line dimming (setBrightness), and color/temperature correction, and dithering.

Also worth pointing out that FastLED provides a uniform API for lots of different kinds of LED chips – you don’t have to learn any of the timing-level and data-level baloney that they each seem to have.

Anyway, it is a nice article for beginners, and I like the drawings. But we’re kinda past that point now around here…

Gotcha OK. Just wondering if the approach was compatible because that’s always been a thorn in my side how with WS2812 you have to use a separate chip to poll IR and then handshake the code over to a second chip driving the LED strip. Thank you! You guys are awesome :slight_smile:

This is why I recommend that people move to the apa102 - a short list of improvements:

  • clock/data based protocol means no interrupt disabling
  • 20mhz data rate, much much faster than the 800khz rate of the 2812s
  • 20khz pwm refresh rate blows the 2812’s 400hz pwm refresh rate out of the water

(Also, most of the ir libraries that I’ve seen also have stupidly inefficient interrupt handlers that take more than 80 cycles to run on avr)

If you are stuck with ws2812 then I strongly recommend moving to a due or teensy3.x, both of which can use interrupts with them.

Great suggestion, thank you! Idk why I haven’t messed with APA yet.

When you do, make sure you’re getting APA102, and not the APA104 (which is a near exact WS2812 clone) or the APA106 (which is a similar protocol to the WS2812, but different timing).

Adafruit sells them as Dotstars