I have a buffer to store the text messages (SMS) - char replybuffer [255].
How can I clear this buffer so that until I send a new text message the buffer, it should keep sending SMS to the old number and upon receiving number (sent in the form of text) it should read only the new number in the text?
What I'm finally trying to achieve is- I have a command to send the SMS after reading the mobile number stored in the buffer
fona.sendSMS(replybuffer, "GOT IT");
Here, I'm only able to send the SMS to the number stored in 1st text.
The command I'm using to delete the SMS is:
fona.deleteSMS(0)
My logic to trigger the SMS:
if (valCO1 < 5 && valCO2 < 5 )
// need the update buffer logic here I guess
if (millis() - startTime > 1UL*60UL*1000UL) {
startTime = millis();
//sendAlert();
fona.sendSMS(replybuffer, "GOT IT");
}