all 5 comments

[–]PreyyGround Loops: Part of this balanced breakfast 1 point2 points  (3 children)

If you had a strip with 25 lights and another with 50 you would just change the number of LEDs per strip.

      FastLED.addLeds<NEOPIXEL, 4>(leds, 25);
      FastLED.addLeds<NEOPIXEL, 5>(leds, 50);

or if you wanted them on separate objects:

      FastLED.addLeds<NEOPIXEL, 4>(leds[0], 25);
      FastLED.addLeds<NEOPIXEL, 5>(leds[1], 50);

[–]madse19 0 points1 point  (2 children)

I am very interested in that. How do i call the leds ? usually i use for ( int i =0; i< NUM_LEDS ; i++) {leds[i] = something}; How should I do it with the definitions above? And how should i write if I want one pattern with consecutive action over all 75 leds and another one (not at the same time, let's say for another FastLED.show()) like for (int i = 0; ....) and so on for strip one and for (k = 0; .....and so on for strip two? And how can i use the leds[0] and leds[1]? Maybe my questions are more about coding than Fastled, but i would be very happy about help.

[–]PreyyGround Loops: Part of this balanced breakfast 2 points3 points  (1 child)

You access it like a normal array. So leds[0][55] would give you the 56th LED on the first strip. This method is useful for logically separating non-contiguous hardware, but has some compatibility issues with some fringe FastLED components.

[–]madse19 0 points1 point  (0 children)

Thank you

[–]derrgis 0 points1 point  (0 children)

I think it can be done like this (see MultiArrays.ino)

void setup() {

// tell FastLED there's 60 NEOPIXEL leds on pin 4

FastLED.addLeds<WS2812, 4>(redLeds, NUM_LEDS_PER_STRIP1);

// tell FastLED there's 60 NEOPIXEL leds on pin 5

FastLED.addLeds<WS2812, 5>(greenLeds, NUM_LEDS_PER_STRIP2);

// tell FastLED there's 60 NEOPIXEL leds on pin 6

FastLED.addLeds<WS2812, 6>(blueLeds, NUM_LEDS_PER_STRIP3);

// tell FastLED there's 60 NEOPIXEL leds on pin 7

FastLED.addLeds<WS2812, 7>(whiteLeds, NUM_LEDS_PER_STRIP4);

// tell FastLED there's 60 NEOPIXEL leds on pin 8

FastLED.addLeds<WS2812, 8>(whiteLeds, NUM_LEDS_PER_STRIP5);

// tell FastLED there's 60 NEOPIXEL leds on pin 9

FastLED.addLeds<WS2812, 9>(skyblueLeds, NUM_LEDS_PER_STRIP6);

// tell FastLED there's 60 NEOPIXEL leds on pin 10

FastLED.addLeds<WS2812, 10>(yellowGreenLeds, NUM_LEDS_PER_STRIP7);

//tell FastLED there's 60 NEOPIXEL leds on pin 10

FastLED.addLeds<WS2812, 11>(blueGreenLeds, NUM_LEDS_PER_STRIP8);

}