Hi~ I have a lot of static data to store - in the form of multidim char arrays of varying lengths. I figure this is a good opportunity to learn about PROGMEM since I haven't used it before.
Looking at the reference pg (PROGMEM - Arduino Reference) I get some of it but... not quite. Before I start just poking the code I thought I would ask here.
In the sketch below, what I would like to do is get a pointer to CHR_21 and then be able to step through it without knowing it's length.
#include <avr/pgmspace.h>
PROGMEM prog_char CHR_21[][2]={{10,0},{5,21},{5,7},{128,128},{5,2},{4,1},{5,0},{6,1},{5,2}};
char *buffer;
void setup(){
Serial.begin(115200);
}
void loop(){
strcpy_P(buffer, (char*)pgm_read_word(&CHR_21));
for(; *buffer; buffer++){
Serial.println(buffer[0]);
Serial.println(buffer[1]);
}
delay(500);
}