And now that you've shared the struct, and told us that it's unchanging, following the examples shown in PROGMEM reference page tells you do do something like this:
struct MessageStruct {
const int messageId;
const char *textLine1;
const char *textLine2;
const char *textLine3;
const byte myDoWNum;
const byte myHour;
const byte myMinute;
const int followonMId;
};
const char string_0[] PROGMEM = "Take the two green &";
const char string_1[] PROGMEM = "black tablets in top";
const char string_2[] PROGMEM = "row of blister pack.";
const MessageStruct messages[8] PROGMEM = {
{1, string_0, string_1, string_2, 32, 8, 0, 2},
{1, string_0, string_1, string_2, 32, 8, 0, 2},
{1, string_0, string_1, string_2, 32, 8, 0, 2},
{1, string_0, string_1, string_2, 32, 8, 0, 2},
{1, string_0, string_1, string_2, 32, 8, 0, 2},
{1, string_0, string_1, string_2, 32, 8, 0, 2},
{1, string_0, string_1, string_2, 32, 8, 0, 2},
{1, string_0, string_1, string_2, 32, 8, 0, 2}
};
void setup() {
char buffer[80];
Serial.begin(115200);
for( int i=0; i<8; ++i ) {
strcpy_P(buffer, (char *)pgm_read_ptr(&messages[i].textLine1));
Serial.println(buffer);
strcpy_P(buffer, (char *)pgm_read_ptr(&messages[i].textLine2));
Serial.println(buffer);
strcpy_P(buffer, (char *)pgm_read_ptr(&messages[i].textLine3));
Serial.println(buffer);
}
}
void loop() {
}
And the build results:
arduino-cli compile -b arduino:avr:uno --warnings all --output-dir ~/tmp --no-color (in directory: /home/me/Documents/sketchbook/Uno_R3/test)
Sketch uses 4656 bytes (14%) of program storage space. Maximum is 32256 bytes.
Global variables use 188 bytes (9%) of dynamic memory, leaving 1860 bytes for local variables. Maximum is 2048 bytes.Compilation finished successfully.
188 bytes of RAM used. Which is virtually the same amount of RAM used in the empty sketch that simply opens Serial.
void setup() {
Serial.begin(115200);
}
void loop() {
}
arduino-cli compile -b arduino:avr:uno --warnings all --output-dir ~/tmp --no-color (in directory: /home/me/Documents/sketchbook/Uno_R3/test)
Sketch uses 4296 bytes (13%) of program storage space. Maximum is 32256 bytes.
Global variables use 184 bytes (8%) of dynamic memory, leaving 1864 bytes for local variables. Maximum is 2048 bytes.
Compilation finished successfully.