Got the following error:
cannot convert 'const char*' to 'const __FlashStringHelper*' for argument '1' to 'void printlnStoredString(const __FlashStringHelper*)
Edit: Changed gears a little bit and followed this tutorial by Nick Gammon.
Code now looks like this:
const char stringTable[6][10] PROGMEM {
{"String 1"},
{"String 2"},
{"String 3"},
{"String 4"},
{"String 5"},
{"String 6"}
};
void printStoredString(const char* str, bool newLine = false){
char c;
if(!str){ return; }
while((c = pgm_read_byte(str++))){ Serial.print(c); }
if(newLine){ Serial.println(); }
}
void loop(){
for(int i = 0; i < 6; i++){
printStoredString(stringTable[i], true);
}
}
Seems to be working just fine, and uses fewer lines of code, but would have less memory savings if my string sizes varied greatly.