Thanks for taking the time to reply.
@code posting, yeah that was a mistake these things happen, now corrected when I last checked.
In theory the power shouldn't be lost once the module is setup, certain data will need to remain after a power cycle, if it does occur. In theory once setup it will rarely ever change.
Currently the module is work in progress.
first objective get it working // can live with an untidy but functional system
second objective get it working smarter // learning
third objective get the code clean. // ultimate goal
I'll be honest been through many examples and had trouble getting some working full stop.
At the moment, I am only storing 3 numbers, in my original code i was able to enter them from the Serial monitor and prompted for each one in turn.
recalling the numbers start at 0, 11 and 22 so the indexs are not saved as i know where they are starting from so they are hard coded, I say hard coded.
I will revisit some the searches and have another look at my options.
below is what i was using for the Serial Monitor entries.
void Number(){
int i;
for (i = 0; i < 3; i++) {
Serial.print("Input Mobile Number: ");
Serial.println(i+1);
Serial.println("Awaiting Input"+i);
while(Serial.available()==0){}//wait for user input
no1 = Serial.readString(); //read input
//Serial.println(i+1);
Serial.println(no1);
if(no1.startsWith("SMS",0)){
Serial.println(i+1);
Serial.print("Saving variable string to address: ");
Serial.println(i*11);
no1s = no1.substring(4);
myString=no1s;
myString.toCharArray(myStringChar, BUFSIZE); //convert string to char array
strcpy(buf, myStringChar);
eeprom_write_string((i*11), buf);
Serial.print("Reading string from address : ");
Serial.println(i*11);
eeprom_read_string((i*11), buf, BUFSIZE);
Serial.println(buf);
}
}
}