Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Teensy 3.6, FastLED 3.1.6, Parallel WS2811 fails with < 4 lanes #494
Steps to repeat:
With a teensy 3.6 (and perhaps other platforms), attach 1 WS281x strip to pin 2 (and wire up power and ground.) Load up the FastLED "ParallelOutputDemo" example and make the following two changes:
Upload and run the demo. Nothing happens. If you change NUM_STRIPS to 4, everything works again.
This issue seems to be related to the actual "leds" array, and not to the parameters passed to the template. To demonstrate, change NUM_STRIPS back to 4 (and things work.) Then go into the loop() function of the demo, and alter the first for() loop from "for(int i = 0; i < NUM_STRIPS; i++)" to "for(int i = 0; i < 1; i++)" (only changed "NUM_STRIPS" to "1".) Run that and it fails again. Even if you set all the led elements to CRGB::White the the strips beyond 1, it still fails. (On the other hand, if you set the led elements to "CHSV( HUE_RED, 255, 255)", it works. That makes no sense to me.)
Even if using less than 4 strips might not offer a vast performance improvement, it should still work.
** Even More Info:**
The issue is most definitely related to the leds array itself and not the NUM_STRIPS template parameter passed calling addLeds(). If you leave NUM_STRIPS as 4, but edit the addLeds<>() call to change "NUM_STRIPS" to "1", then everything works IFF the entire leds array gets populated each iteration (including elements of the led array that provide color data for non-existent LED strips.)