Datasheet
simply add const before the variable name:
const char str[] = "My very long string";
That string is now in FLASH. You can manipulate the string just like RAM data, the compiler
will automatically read from FLASH so you dont need special progmem-knowledgeable
functions.
You can verify where data is stored by printing out the address:
Serial.print("Address of str $"); Serial.println((int)&str, HEX);
If the address is $2000000 or larger, its in SRAM. If the address is between $0000 and
$3FFFF Then it is in FLASH
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le Page 53 of 238










