1

I have an Arduino program written for the nRF52 with which runs for a pre-set time-value (i.e. 2 minutes) before shuts off automatically. The variable time-value can be changed via BLE-write by the user from an external device (i.e. from 2 mins to 5 mins). The problem that it defaults to the pre-set (2 mins) value once the program restarts. How can I have the program "save" the last used time-value variable (i.e. 5 mins) for the next boot up/restart?

As I understand Nordic's nRF52 does NOT have an onboard EEPROM like AVRs. I read about a Little File System by Adafruit that creates a sort of persistent storage space, but I hope there is something simpler.

TommyS
  • 71
  • 7

1 Answers1

2

The arduino-NVM library for nRF51 and nRF52 MCU has EEPROM object which emulates EEPROM in the internal flash memory of MCU.

The EEPROM object in arduino-NVM has the same functions as the EEPROM object in the Arduino EEPROM library for classic ATmega.

Juraj
  • 18,264
  • 4
  • 31
  • 49