I need to get these strings out of dynamic memory and into flash. When I use "PROGMEM" as in the code below, it only saves about 20 bytes of dynamic memory.
const char *const alarm_msgs[] PROGMEM = {
"Sump Pump Failed ", // 0
"Shop Floor Wet ",
"Studio Bath Wet ",
"Sump is Full ",
"Sump is High ",
"Sump Sensor Error ", // 5
"Shop Well Tank LOW ",
"Shop Rain Tank LOW ",
"House Rain Tank LOW ",
"House Well Tank LOW ",
"Utility Floor Wet ", // 10
"Shop Below 35 ",
"Studio Below 60 ",
"Paint Room Below 60 ",
"Main: no flow ",
"Main: flow, no heat ", // 15
"Bsmt: no flow ",
"Bsmt: flow, no heat ",
"Shop: no flow ",
"Shop: flow, no heat ",
"Vent needs wndow opn", // 20
"Vent needs door open"
} ;
If I comment out the entire set of strings and replace it with
const char* alarm_msgs[] = " now " ;
It saves 440 bytes of dynamic memory. The only idea I have is that I have to use "PROGMEM" on each line, or build the array as 21 separate statements, all with "PROGMEM" in each one, something like this?
const char* alarm_msgs[0] PROGMEM = " first line " ;
const char* alarm_msgs[1] PROGMEM = " second line " ;
etc.