give fast and early alert sms to selected personnel in an event of accident.
Tuesday, 23 October 2012
System Programming for GSM Accident Notification System
****Coding for GSM Accident Notification System
#include <GSM_Shield.h>
# define LED 13
# define BUTTON 6
//**************************************************************************
char number[]="+60163024022"; //Destination number
char text[]="Accident Happen to WTF 7676!!!"; //SMS to send
//**************************************************************************
int error;
int val = 0;
void setup()
{
pinMode (LED, OUTPUT);
pinMode(BUTTON, INPUT);
Serial.begin(9600);
Serial.println("system startup");
}
void loop()
{
val = digitalRead(BUTTON);
Serial.println("ready to sent sms");
if (val == LOW)
{
digitalWrite(LED, HIGH);
{
Serial.print("Send SMS to ");
Serial.println("SMS sent \n");
}
}
else {
digitalWrite(LED, LOW);
}
delay(500);
return;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment