Jan 18, 2015

Save SRAM by moving strings to PROGMEM; F() shortcut

Paul Stoffregen of PJRC made F() command to make this easy.
saves RAM on text strings by pushing to PROGMEM with a macro (Note that it is built in to the language). Useful for UNO, teensy 2 and other Harvard architecture atmel arduinos.

 Serial.println(F("This string is stored in program memory instead of static ram!"));
https://learn.adafruit.com/memories-of-an-arduino/optimizing-sram

Also note that the teensy 3.x doesn't need this; define strings in advance as const char