updating sms from time to time using GPS/GPRS/GSM Module V3.0

Hello,i'm currently new here and i need help regarding GPS/GPRS/GSM Module V3. I've been developing a prototype of portable weather station and it is for my master research but I've got a little problem when i try to update SMS about 30 minutes from the previous one.I'm using the source code below as my references
void setup()
{
//Init the driver pins for GSM function
for(int i = 0 ; i < 3; i++){
pinMode(gsmDriverPin[i],OUTPUT);
}
digitalWrite(5,HIGH);//Output GSM Timing
delay(1500);
digitalWrite(5,LOW);
digitalWrite(3,LOW);//Enable the GSM mode
digitalWrite(4,HIGH);//Disable the GPS mode
delay(2000);
Serial.begin(9600); //set the baud rate
delay(5000);//call ready
delay(5000);
delay(5000);
}
void loop()
{
Serial.println("AT"); //Send AT command
delay(2000);
Serial.println("AT");
delay(2000);
//Send message
Serial.println("AT+CMGF=1");
delay(1000);
Serial.println("AT+CMGS=\"011XXXXXXX\"");//Change the receiver phone number
delay(1000);
Serial.print("HELLO");//the message you want to send
delay(1000);
Serial.write(26);
while(1);
}
So,how can i change the program so that for an example the "HELLO" message will be sent and will be updated to my mobile phone for every 30 minutes from the previous one. I really appreciated for everyone cooperation.TQVM :D
void setup()
{
//Init the driver pins for GSM function
for(int i = 0 ; i < 3; i++){
pinMode(gsmDriverPin[i],OUTPUT);
}
digitalWrite(5,HIGH);//Output GSM Timing
delay(1500);
digitalWrite(5,LOW);
digitalWrite(3,LOW);//Enable the GSM mode
digitalWrite(4,HIGH);//Disable the GPS mode
delay(2000);
Serial.begin(9600); //set the baud rate
delay(5000);//call ready
delay(5000);
delay(5000);
}
void loop()
{
Serial.println("AT"); //Send AT command
delay(2000);
Serial.println("AT");
delay(2000);
//Send message
Serial.println("AT+CMGF=1");
delay(1000);
Serial.println("AT+CMGS=\"011XXXXXXX\"");//Change the receiver phone number
delay(1000);
Serial.print("HELLO");//the message you want to send
delay(1000);
Serial.write(26);
while(1);
}
So,how can i change the program so that for an example the "HELLO" message will be sent and will be updated to my mobile phone for every 30 minutes from the previous one. I really appreciated for everyone cooperation.TQVM :D
2014-09-23 18:57:47 Welcome Shah,
Do you want to send SMS every 30 minutes? You could check the last code:[code]while(1);[/code]
It means it will send this message only for once. You could change it to 30x60x1000=1800000.
[code]delay(1800000);[/code] or write a if-else sentence to calculate the time.
Grey.CC
Do you want to send SMS every 30 minutes? You could check the last code:[code]while(1);[/code]
It means it will send this message only for once. You could change it to 30x60x1000=1800000.
[code]delay(1800000);[/code] or write a if-else sentence to calculate the time.
