I am self-learning Arduino programming. Now, I am onto a project using GSM module when called upon to return me some physical value from a sensor. It works pretty well until when I am trying to retrieve caller number from +CMT: because I want the program to filter out all other incoming caller’s request except the specified caller number. Well, I did come up with two boolean statements - DetectIncomingCall() and SMSRequestState() - to achieve it at the end but the code is a bit chunky. I am just wondering if there is a way to program my code to parse both caller number and message content together in String. I have tried the below attempt but the code didn’t really get into the second if statement. Attached is my entire project code!
Message.trim();//get rid of newline character
Serial.println("…Request Received \n");
Message = “”;