Is there a way to setup FastLED with a pin number defined at runtime?

Is there a way to setup FastLED with a pin number defined at runtime? This method:

FastLED.addLeds<NEOPIXEL, 4>(leds, NUM_LEDS_PER_STRIP);

Doesn’t allow me to pass a variable in lieu of the ‘4’. I need to be able to define a variable number of strips (using the array of arrays method) with different pins based on defines. Thanks!

No - the pin definitions are compile time (it’s a part of how FastLEd does a number of its i/o optimizations)

Would it be possible to define all the strips and pins you might use and then at runtime just send data to the active ones?

I wound up with this:

LedController::LedController() {

#if defined (CORE_TEENSY) && defined (MK20DX256)
FastLED.addLeds<NEOPIXEL, 2>(leds[0], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 14>(leds[1], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 7>(leds[2], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 8>(leds[3], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 6>(leds[4], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 20>(leds[5], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 21>(leds[6], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 5>(leds[7], NUM_LEDS_PER_STRIP);
#elif defined(CORE_TEENSY) && defined (MKL26Z64)
FastLED.addLeds<NEOPIXEL, 17>(leds[0], NUM_LEDS_PER_STRIP);
#endif

}