Is my syntax wrong or is setting an array for CRGBSet just not possible.

Is my syntax wrong or is setting an array for CRGBSet just not possible.

CRGBArray<gndiLedCnt_Max> gndiLed;

CRGBSet gndiMrk[0](gndiLed( 0, 11));
CRGBSet gndiMrk[1](gndiLed( 12, 23));
CRGBSet gndiMrk[2](gndiLed( 24, 36));

I am getting an error “bad array initializer”.

I haven’t seen this used before but that could certainly be useful. Would the array need to be defined before hand?
It could be helpful if you posted your full test code to pastebin or gist.

@Gregg_Novosad , since you did not post all of your code, I do not know what gndiLedCnt_Max is. Here is a sketch of mine in pastebin that uses CRGBSet:

http://pastebin.com/ebcdKL1V

I created it to help me learn how to use CRGBSet and to help me learn how to make an array of arrays that contain CRGBSet arrays. I used it with a NeoPixel ring and an Arduino UNO.

Thank you for this example @Ken_White ​.

Thanks Ken. Very helpful. Learned a few things from the paste such as you can’t do chsv colors to whole crb arrays., only on the actual array element.

@Gregg_Novosad , you can fill a whole CRGBSet array using CHSV colors. Check out my following pastebin sketch:

http://pastebin.com/WNRnVX3p

It fills whole CRGBSet arrays using the fill_solid function. The color for the fill_solid function can be entered as either a CRGB color or a CHSV color. I used it with a NeoPixel ring and an Arduino UNO.

I guess I should of been more clear. My goal is to work primarily in the redefined CRGB array. In your example that is ledsarry.

ledsarry = CHSV( 96, 255, 255); // didn’t work
ledsarry[0] = CHSV( 96, 255, 255); // didn’t work
ledsarry[0][1] = CHSV( 96, 255, 255); // worked

Hi Gregg: Thanks for the clarification. I think what you are asking for is: fill_solid(ledsarry[0], 8, CHSV( 96, 255, 255)).

In FastLED, there are only two ways that I know of to fill a group of pixels with a solid color. One is to use a for loop and fill each pixel. The other is to use the fill_solid function which does the same thing as the for loop but is in a function ( see https://github.com/FastLED/FastLED/blob/master/colorutils.cpp). I think that the syntax that you desire is not available in FastLED.

Here is a sketch in pastebin:

http://pastebin.com/wKihv2YT

that does what you want using the redefined CRGB array plus I have added using fill_rainbow with the redefined CRGB array. Also, I have created a new function using fill_solid with the redefined CRGB array. I used it with a NeoPixel ring and an Arduino UNO.

Gregg, thank you for your questions since it allowed me to go back and improve my understanding of CRGBSet arrays and my skills using CRGBSet arrays.