how to struct array on function?

typedef struct struPixel {
	uint8_t R;								
	uint8_t G;                
	uint8_t B;                
	uint8_t V;							  // brightness 
};

const struPixel PROGMEM Gen1[] = {{255,0,0,10},{255,0,0,55},{255,0,0,10},{0,255,0,5},{0,0,255,5}};

void setup() {
...
}

void loop() {
	DrawPattern(7, &Gen1, sizeof(Gen1)/sizeof(struPixel));
	delay(10000);
}

void DrawPattern(int iPos, struPixel (*Pixels)[], int iSize) {
	for (int i=0; i<iSize; i++) {
		if (iPos-i >= 0){
			ShowPixel(iPos-i, Pixels[i]->R,Pixels[i]->G,Pixels[i]->B,Pixels[i]->V);
		}
	}
}
...

I have problem to define the struct array on function. Allways i has an error.
Can anyone help me to define the DrawPattern pointer array from struct struPixel?

TY

Because of the way the Arduino IDE generates function prototypes for the user, you usually need to put structure definitions in a separate .h file that you then #include in your .ino sketch.

(also, I think you're missing the type name. "struPixel" is the structure name:

typedef struct struPixel { ... } struPixel_type;

You don’t need to use a separate header file. You need something like

typedef struct struPixel {
  uint8_t R;
  uint8_t G;
  uint8_t B;
  uint8_t V;                // brightness
};

const struPixel PROGMEM Gen1[] = {{255, 0, 0, 10}, {255, 0, 0, 55}, {255, 0, 0, 10}, {0, 255, 0, 5}, {0, 0, 255, 5}};

void setup() {
//  ...
}

void loop() {
  DrawPattern(7, Gen1, sizeof(Gen1) / sizeof(struPixel));
  delay(10000);
}

void DrawPattern(int iPos, struPixel* Pixels, int iSize) {
  for (int i = 0; i < iSize; i++) {
    if ((iPos - i) >= 0) {
      ShowPixel(iPos - i, Pixels[i].R, Pixels[i].G, Pixels[i].B, Pixels[i].V);
    }
  }
}

BUT BUT BUT I’m pretty sure your PROGMEM statement will not work as you expect. You will need to read Gammon Forum : Electronics : Microprocessors : Putting constant data into program memory (PROGMEM) .