I have a few ws2812 GRB and a few ws2812B RGB leds and I would like to put them in the same string.
Is it enough if I just add them with addLeds in the setup routine in the order they are located in the physical string? Because, as far as I understand FastLED, addLeds adds them to the array with all their properties. And as soon as FastLED want to change the condition of an Led it is doing this according to the properties in the array. Doesn’t it?
@marmil
This is one of the examples why I ask the question in a way that I’m almost convinced that it’s possible. I say almost because I’m still in doubt that this is possible on the same pin. In all examples the different controllers and leds are distributed over different pin. But they are never mixed in a row on the same controller pin.
You need to use different pins for different types of strips that have different controller chips.
However, if you have two strips of the same type connected as one continuous long strip, but the second one has a different color order (maybe was made by a different manufacturer for example) it could be corrected in code by flipping the RGB around for those pixels with a subroutine right before calling FastLED.show().
Since (if I understand the FastLED code correctly) ws2812 and ws2812B (and “NEOPIXEL”) use the same FastLED code under the hood I think you can do this.
Hook them together as one long strip and use type ws2812 or ws2812b and see if they can both be controlled. Then flip the color order around for half the pixels as needed before displaying.
For example, something like this in a loop to flip red and green:
uint8_t temp = leds[i].r;
leds[i].r = leds[i].g;
leds[i].g = temp;