PROGMEM - Arduino Reference
0
13
Reference > Language > Variables > Utilities > Progmem [Utilities] DescriptionKeep constant data in flash (program) memory only, instead of copying it to SRAM when the program starts. There’s a description of the various types of memory available on an Arduino board.The PROGMEM keyword is a variable modifier, it should be used only with the datatypes defined in pgmspace.h. It tells the compiler "keep this information in flash memory only", instead of copying it to SRAM at start up, like it would normally do.PROGMEM is part of the pgmspace.h library. It is included automatically in the Arduino IDE.While PROGMEM could be used on a single variable, it is really only worth the fuss if you have a larger block of data that needs to be stored, which is usually easiest in an array, (or another C++ data structure beyond our present discussion).Using PROGMEM is a two-step procedure. Once a variable has been defined with PROGMEM, it cannot be read like a regular SRAM-based variable: you have to r...