Hello, I’m testing my new APA102 strip with FastLED and I’m having an issue, the channel order for the last LED in the chain always seems to be wrong. I made a little test that will light the whole strip red, then green, then blue and then black. The last led in the strip starts black, then red, then green, then blue.
Here’s my code:
I also tried lowering the number of leds (say 140 instead of 144) but led 140 behaves the same way.
Any ideas ?
Interesting. How small can the delay be and still fix the issue?
What about replacing that last FastLED.show() with FastLED.delay(3), as that calls FastLED.show() behind the scenes.
I still don’t see why the original code didn’t work as expected.
With the sketch as it is, when setup() is completed he just sits there doing nothing forever… that is probably the longest delay() you could ever have…
I’m using Arduino 1.6.3 with the latest teensyduino (1.22 beta)
The strange thing is that the other sketch I use which reads pixel data from serial doesn’t have this problem.
It would help to know what hardware you are compiling for. Edit. just saw the comment mentioning teensy 3.1 - i’ll setup some hardware here later tonight to check.
The APA102 requires some extra clock line strobing after writing out data to ensure that data propagates all the way to the last led. It sounds like this may not be happening w/hardware SPI for some reason - i’ll need to dig into the why.
Actually - strike that - found and fixed a problem in the APA102 code that would affect when using hardware SPI on the teensy 3 and checked in a fix on the 3.1 branch - pull that and re-test.