GoForSmoke:
I made this function to print the stored strings one char at a time:void printMsg( PGM_P FM )
{
do
{
B = pgm_read_byte( FM++ ); // FM++ is pointer math; look Ma, no indexes!
if ( B ) Serial.print( B );
}
while ( B ); // when it reaches the terminating zero, it exits
}
This could be actually shortened down to:
void printMsg( PGM_P FM )
{
Serial.print (reinterpret_cast<__FlashStringHelper *> (FM));
}
It would be better to do the same thing with a macro, thought. Or even always doing the cast explicitly.
PS: Use lowercase - and meaningul - names for variables (i.e.: FM -> str).