im trying to use progmem instead on static char to save some valueble space. Everything seems fine, but serial and lcd show some weird newline symbol instead of my text.
What im trying to do:
...
#include <avr/pgmspace.h>
const static char PROGMEM textSDFailed[] = "Filesys failed";
const static char PROGMEM textSDAvailable[] = "Filesys is avail.";
...
lcd.print(textSDFailed);
...
And what i get on lcd when print: https://i.stack.imgur.com/V81Pn.jpg
Can someone help me?
You can use the
print
which takes a progmem string. The overloadedprint
for progmem string has__FlashStringHelper*
as parameter. This is normally for the Arduino F() macro.For repeated use of the cast I do:
Then I use it this way:
If you can, use the F macro directly: