Post topics, source code that relate to the Arduino Platform

User avatar
By Barnabybear
#51362 Hi, thanks for the help guys - it looks like I have this cracked and learnt quite abit aswell.
@ Martin. I'm sorry 'function' was not realy the best term to put in there to try and simplfy for the post, the actual line is now;
Code: Select all  strip.SetPixelColor(i, pgm_read_byte_near(array_selector + (i + 0 + Line_Offset)), pgm_read_byte_near(array_selector + (i + 1 + Line_Offset)),  pgm_read_byte_near(array_selector + (i + 2 + Line_Offset)));

Preceded by:
Code: Select all      for(int i = 17; i < 25; i++){ // file name bytes.
      PSEQ_Data_File[i -17] = (packetBuffer[i]); // read FPP file name.
      }

And:
Code: Select all  if (strcmp(PSEQ_Data_File,"blu_cha1") == 0 ){
    array_selector = blu_cha1;
  }
    else if (strcmp(PSEQ_Data_File,"red_cha1") == 0 ){
        array_selector = red_cha1;
  }
    else if (strcmp(PSEQ_Data_File,"gre_cha1") == 0 ){
        array_selector = gre_cha1;
  }

For each of the arrays.

Anyway thanks again.