jezza103:
Thank you liudr. I have had a quick look at your code. Before i even try to use it I will have a read about state machines. I will get back to you and let you know how I get on.
regards
Jeremy
You are welcome.
Add the following in setup():
Serial.begin(9600);
pinMode(alarm_pin,OUTPUT);
digitalWrite(alarm_pin,LOW);