I am trying to work on an Arduino project and for some reason, I cannot get it to store the data on the Adafruit metro m4 controller or data logger shield (saving so that when reconnected the data entered would still be there). I have an SD card for the TFT LCD, I would appreciate any help, not sure what I'm missing. Thank you!
Here is basically what I have so far related to EEPROM functions and it seems to compile without errors but does not work for EEPROM. If I run it on a different board (Arduino Uno) it seems to activate but then the issue is that the code is intended to run only on SAMD21 or SAMD51 boards. Is there a way to adapt the EEPROM functions for the metro m4 or if any changes can be made to get it functional? Please let me know if any questions, appreciate any and all help!
for example:
void readAllConfiguration() {
readLogs();
AveragePeriodDuration = EEPROM.read(ADDR_AVERAGE_DAYS);
LogId = EEPROM.read(ADDR_LOGGED_COUNT);
Serial.print("Lod ID mem: ");
Serial.println(LogId);
if(LogId > 100)
LogId = 0;
if(AveragePeriodDuration > 100)
AveragePeriodDuration = 28;
}