This is actually not the original code that I'm using. I'm currently doing my final project. My objective is to prevent fire incident at home or any place that can cause fire incident. So I create a project that can detect the LPG gas and send sms to the owner. The owner also can send a sms to the specific number and the arduino will calculate the gas surrounding the kitchen area by the help of the MQ2 sensor if the owner is not at home. Then the sim900 will send back to the incoming number which is the owner's number that I have set in the code. I manage to do that but I just want to know what if the owner is using other phone number to send the sms? Is it possible to create a command to make it auto reply to any incoming number?
this is the snapcode that i want to change.
//code using sms lapor.
lastButtonState = st;
int pos = 0;
pos = sms.IsSMSPresent(SMS_ALL);
sms.GetSMS(pos, n, smsbuffer, 100);
if (!strcmp(smsbuffer, "lapor"))
PString str(buffer, sizeof(buffer));
str.print("Rate of gas leakage currently at ");
sms.SendSMS("+6xxxxxxxxxx", buffer); //replace this code
It will be great if it can be remove and replace it with a command that can make the arduino operate as an auto reply sms to any incoming number if they send the specific string to the sim900 module