- Wed Dec 30, 2015 3:37 pm
#186901
Hi all
I've set a project to read a temperature, and send an SMS in case the temp goes beyond pre determined limits. It works fine, it reads the temp and sends an alarm when needed.
Now I wanna be able to change the temp settings and the phone number by sending an SMS to the module. For example, I want to send "100687965478" where the first number (1) tells the module to change the phone number in the memory with the one following the (1) -> "00687965478". Another example, I would send "221" where the first number (2) would tell the module to change the low temperature setting to 21 degrees.
Anyway, I can read the content of the SMS using sms.getMessage() but I can't seem to be able to assign the content of the SMS to a char array, because the function returns a pointer... and yes, pointers are easy to understand, right until you have to actually use them!!! So please, how can I assign the value of sms.getMessage() to a char array?
Any help would be greatly appreciated!
Brisben
I've set a project to read a temperature, and send an SMS in case the temp goes beyond pre determined limits. It works fine, it reads the temp and sends an alarm when needed.
Now I wanna be able to change the temp settings and the phone number by sending an SMS to the module. For example, I want to send "100687965478" where the first number (1) tells the module to change the phone number in the memory with the one following the (1) -> "00687965478". Another example, I would send "221" where the first number (2) would tell the module to change the low temperature setting to 21 degrees.
Anyway, I can read the content of the SMS using sms.getMessage() but I can't seem to be able to assign the content of the SMS to a char array, because the function returns a pointer... and yes, pointers are easy to understand, right until you have to actually use them!!! So please, how can I assign the value of sms.getMessage() to a char array?
Any help would be greatly appreciated!
Brisben