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
single WS2812 need to skip indexes to get address right #669
Also, it's searchable by "FC-100 RGB" on Google. In one place there's info that it's WS2811, other place it's WS2812.
Only my wires are longer, using prebuilt wires for arduino and breadboard (male-male).
Using FastLED 3.2.1, Arduino IDE 1.8.7 on Win10, nothing else.
When I use 1 LED, everything works perfectly, i.e. blink:
Next, I'm adding one module. Trying to blink with two LEDS:
Adding coloring to loop:
Now only the first one blinks, the second one is blue (default color when I power it on even without data line).
Ok, now the strange thing:
Increased NUM_LEDS to 3:
NOW it somehow works, but sometimes it goes off at random (blue, purple colors instead of turning off). So the first LED works correctly as
Can anyone tell me what's the problem? Are my LEDs faulty? Or is timing wrong for those specific LEDs? I'm sure it's not normal to double array size and skip indexes by one to get the address right.
My understanding of these modules are the packets are sequential i.e. packet 1, packet 2 ... so the chips receive the data, check for end of data and if not end of data then pass on packet and receive next packet. Thus with three modules they will always receive the last n packets. If you send 5 packets but have only three modules then they will use packets 3,4,5. Correct?
Nope, this is not what happens. It looks like one module "eats" two packets at once. My code demonstrates that - first module lights up on modifying 0-th index of pixel array, second one lights up on modifying 2-nd index, third one - 4-th index, fourth - 6-th index, etc.
Timing issue? WS2811 and WS2812 have slightly different timing requirements and the WS2811 has a high speed mode which halves high and low timings (but not the reset).
I noticed that the leds are 6-pin, WS2812's are only 4 pin - I wonder if what happened is that they put WS2813's on there, but wired up DIN to the backup input pin (the way the WS2813 works is if it gets data on its main DIN pin, it displays the first 24-bits of data that it gets then passes the rest along, if it doesn't get data on that pin, but it does get data on the backup pin, it will skip 24 bits of data, then display the next 24 bits of data that it gets, and then pass the rest along. This is how the WS2813 accounts for individual leds dying).