RGB LED strips

I didn't actually understand this code, so I've just copied it and though the gamma correction was something to be settled before the void loop and it would be applied on the rest. (by the way I took it from this blog Goggin's Arduino: The Duino Light Controller - Slave Module)

Should I also include the following code on the void setup?

  for (int pin = 0; pin <= total_outputs; pin+=1) {
               pinmap[pin]=total_outputs-1;
          }
        
        //5,3,7,6,4,2,1,0,8,9,10,11,12,13,14,15,16
        pinmap[0]=5;
        pinmap[1]=3;
        pinmap[2]=7;
        pinmap[3]=6;
        pinmap[4]=4;
        pinmap[5]=2;
        pinmap[6]=1;
        pinmap[7]=0;
        pinmap[8]=8;
        pinmap[9]=9;
        pinmap[10]=10;
        pinmap[11]=11;
        pinmap[12]=12;
        pinmap[13]=13;
        pinmap[14]=14;
        pinmap[15]=15;
        pinmap[15]=16;

    for (int fadeValue = 0 ; fadeValue <= 255; fadeValue +=1) {
        gamma[fadeValue] = gamma12 (fadeValue);
    }

How can I apply the gamma correction on the fading?

Thanks for the patience with my beginner-stupid questions :slight_smile: