/*
Desk Panic Button
by Randy Sarafan
For more information please visit:
Code in the Public Domain
*/
//includes necessary libraries
#include <SoftwareSerial.h>
#include <String.h>
//establish virtual serial port for shield
SoftwareSerial mySerial(7,8);
// the number of the pushbutton pin
const int buttonPin = 2;
// the state of the button:
int buttonState = 0;
//setup serial and pin states
void setup()
{
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
pinMode(buttonPin, INPUT);
//engage the shield
powerUpOrDown();
delay(500);
}
void loop()
{
//checks to see if there is cause for panic
panic();
//looks to see if the GPRS shield is communicating
if (mySerial.available())
Serial.write(mySerial.read());
}
///DialVoiceCall
///this function is to dial a voice call
void panic(){
//get the current state of the panic button
buttonState = digitalRead(buttonPin);
//checks to see if the panic button is pressed
if (buttonState == HIGH){
//calls phone number
//replace with your own phone number
//if in the US, keep the 1 in the front
//otherwise replace the 1 with your country code
Serial.println("HELLO");
mySerial.print("ATD14155551212;\r");
delay(1000);
}
}
void ShowSerialData()
{
while(mySerial.available()!=0)
Serial.write(mySerial.read());
}
void powerUpOrDown()
{
pinMode(9, OUTPUT);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(9,HIGH);
delay(2000);
digitalWrite(9,LOW);
delay(3000);
}
thats the code thats on the link
would it just be copy and paste?
where would you insert the phone number you want to be called? any help would be greatly appreciated