arduino gsm door alarm

Thanks again. The end goal here for me is to have a keypad and LCD with the door contact.
The keypad arms and dis-arms the system and the lcd shows if the alarm is set or un-set. the door contact triggers the alarm (sms) if the pin number has not been entered in a set time.

I am just working on getting the door contact to send an sms when the door has been open for 3 seonds at the moment. As this will give me time to turn the unit off before sms is sent. Eventually, I will add a keypad and LCD.

It works to a degree, but only need one sms sent when door is open beyound 3 seconds and not additional sms for duration door is open.

i'm no programmer, but trying to understand syntax of code. Thanks for the help. :smiley: