r/FastLED • u/moe_marisa • Feb 10 '24
Support LED Strip Remapping
Hello everyone, I have some irregular LED strips, and I am seeking a convenient method for remapping them. Currently, I am using the following approach:
CRGBArray<NUM_LEDS> leds, remap_leds;
uint8_t ReMap = ; // Remapping sequence
FastLED.;
= ; // Set color
for
As you can see, after modifying leds, it is necessary to reset remap_leds to ensure that the lighting effects take effect correctly. I came across a piece of code that seems to achieve the same result without the need for resetting:
uint8_t leds;
uint8_t* remap_leds = ;
for
for // The output result is 2 1 0 7 6 5 4 3
remap_leds points to leds and reassigns the order without the need to reset it after modifying leds. Is there a similar approach in FastLED?
2
Upvotes
View all comments
Show parent comment
1
u/truetofiction Feb 11 '24
You're doing it backwards. You would add the
ledsarray to the output, and animate using the dereferenced elements of theremap_ledsarray.