I am writing some code for a project where I have a GSM module interfaced with an Arduino to communicate certain notifications when a sensor is triggered and to receive commands via SMS. One such command is to set the 'call out' number via SMS. IE if I send the word 'Set' to the GSM module, the number the message is received from becomes the new number that the GSM module will call out to when sensors are triggered.
I have to initialise a default phone number in the code:
char ph_number[]="+35387914xxxx";
Then within my program I have some code to check for any SMS' that contain the 'Set' command and if so set ph_number = to the senders number.
I need to then permanently save that new number to become the default call out number, even if the Arduino is reset, until such time as a new Set command received. Is there a way to do this? Is it even possible?
Is there any permanent storage on the Arduino and, if so, how can I use it?
– mah