I am working up to a project that will have many strips (perhaps > 50), and I was trying to figure out a way to programmatically do the FastLED.addLeds setup. I put the data pin numbers and number of LEDs per strip into separate arrays, then tried uploading. However, I always get the error " ‘DATA_PIN’ cannot be used in a constant expression" if I put anything in the pin# spot other than an actual typed number (or a defined variable). Even saying “int pin = 3” and then FastLED.addLeds<CHIPSET, pin, COLOR_ORDER>(leds, NUM_LEDS) returns the same error. Will I just need to copy-paste the FastLED.addLeds line for as many strips as I have?
It appears that an array reference cannot appear in a constant-expression. You’re gonna have to addLEDS() without a for loop, nice try though!
Constants are used to allow for some optimizations that can’t be done otherwise.
50, eh? What controller are you going to be using - and how many leds, max? If you have 50 strips of 60 neopixels, you are looking at 90ms/frame - which is going to cap you at about 5-8fps update rate.
Since I don’t currently have an eta for massively parallel output in the library, something like a set of fadecandy devices might be better suited for your project.
No worries. I will just need to work on keeping things orderly without the for loops.