Desk Panic Button , Help Please

hello everyone I am having trouble with a desk panic button code in the following link

if someone can guide me thru the upload process to the board it would be much appreciated. thank you in advance

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


void loop()

//checks to see if there is cause for panic

//looks to see if the GPRS shield is communicating
if (mySerial.available())

///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



void ShowSerialData()

void powerUpOrDown()
pinMode(9, OUTPUT);

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

Have you read:

Edit your post and add code tags to the sketch.
Please use code tags. Use the </> icon in the posting menu. [code] Paste sketch here. [/code]

Yes you can just copy and paste.

You'll need to install the SoftwareSerial library (see the IDE's Sketch menu, Include library, Manage libraries).

The phone number goes in this line.


do i just add the number or replace the ATD number with the phone number?

theuden: do i just add the number or replace the ATD number with the phone number?

AT is an 'AT command'. ATD means 'AT - Dial', the command to dial a number.

If your phone number is 502 123456789 I think the line needs to be


The comment says you need to include the international dialling code, which is 502 for Guatemala. Sometimes to do international dialling you need to put a + first like this.


Also Some AT enabled devices need the \r\n at the end of the command rather than just \r

(I’ve found that’s always sending \r\n works as the \n will just get ignored if not necessary. This is what println() does. It Prints data to the serial port as human-readable ASCII text followed by a carriage return character (ASCII 13, or ‘\r’) and a newline character (ASCII 10, or ‘\n’).)