I'm facing a problem can't be able to resolve to store an array of struct in nvs.
I have this structure composed of variable length String:
typedef struct
{
String Name;
String Surname;
String Status;
String Expiry;
} EpromTags;
EpromTags arraytag[50];
void setup()
{
//should load arraytag from EEPROM here
}
In other routines I have this data coming from a remote server, so I'm saving it to me arraytag
for (int i=0, i<50,i++)
{
arraytag[i].Name = valuename[i];
arraytag[i].Surname = valuesurname[i];
arraytag[i].Status = valuestatus[i];
arraytag[i].Expiry = valueexp[i];
}
//should save to arraytag to EEPROM here
The idea is to load the value of the structure to men on arrive and load back on setup.
I have been able to write single elements to EEPROM but I'm finding difficulties in saving this array of struct.
can someone drive me in the right directions or have suggestions?