How to store data in the flash memory of a Arduino Uno (ATmega328p)

From the ATmega328P datasheet, “Boot Loader Support” section, “Application and Boot Loader Flash Sections” subsection, “Application Section” subsubsection: … the SPM instruction is disabled when executed from the Application section. Therefore there is no way to write to flash from the running program. Use an external memory device if you need to store more data … Read more