Help me please im a beginner

Arduino reference for how to write a for loop:
https://www.arduino.cc/reference/en/language/structure/control-structure/for/

As said: start from something that works. Take an example from the library and make it work. Whatever it does is not important (rainbow, nightrider, anything). It is also not important if it fits your needs straight away. It will give you a valid starting point. From there you can start building whatever you like. And we will try to help you. But so far I see no point where to start from your code, as I presume it has multiple issues... ...like missing pieces... ...and use of pointers that I would not recommend to a newbie.


Yeah, you need to learn up on the *for* loop.
byte whichGroup = 3;  // which group to display.

for (int ii = 0; ii < groupLengths[whichGroup]; ii++) 
  leds[groups[whichGroup][ii] ] = CRGB::Blue;

Or write it as a function you can call with a group number:

void burnGroup(byte whichGroup)
{
    for (int ii = 0; ii < groupLengths[whichGroup]; ii++) 
        leds[groups[whichGroup][ii] ] = CRGB::Blue;
}

The patterns end up having numbers, not names. If names are important, you can # define some constants that look like names.

Here it is complete in a wokwi.com, take a look at the syntax.

FWIW and BTW, to get this to compile in another environment entirely I had to change

const byte groupCount = 4;

to

# define groupCount 4

to stop this error (GDB on line C compiler www.onlinegdb.com)

14 | const byte groupCount = 4;
| ^~~~
main.c:16:24: error: variably modified ‘groups’ at file scope
16 | const unsigned char *groups[groupCount] = {downstairs, upstairs, garden, shed};
| ^~~~~~

Aren't consts supposed to be, um, constant?

HTH

a7