Hello,
I'm trying to store and read a char* array on progmem to save SRAM, I followed this article avr-libc: Data in Program Space but I can not retieve the content correctly
my code is like this:
char *string_table[] PROGMEM =
{
"String 1",
"String 2",
"String 3",
"String 4",
"String 5"
};
PGM_P string_table[] PROGMEM =
{
string_1,
string_2,
string_3,
string_4,
string_5
};
Serial.println(string_table[0]); //must print "String 1"
Serial.println(string_table[1]); //must print "String 2"
Serial.println(string_table[2]); //must print "String 3"
Serial.println(string_table[3]); //must print "String 4"
Serial.println(string_table[4]); //must print "String 5"
¿Can somebody help me?
Best regards and a lot of thanks in advance