 void pirStateChange() {
   static unsigned long last_interrupt_time = 0;
   unsigned long interrupt_time = millis();
-  if (interrupt_time - last_interrupt_time > 1000)
+  if (interrupt_time - last_interrupt_time > 500)
   {
     pir_alarm_state = true;
   }

bool buzzPin_state = LOW;
unsigned long start_buzz_time = 0;
bool soft_alarm_state = false;
<<<<<<< HEAD
bool pir_alarm_state = false;
=======
>>>>>>> 2e87ac67c97485ac5c1b4994cb3e968dcd442e6a

unsigned long currentTime = 0;
unsigned long startTime   = 0;


  // connect D2 pin as an External Interrupt - Reed switch
  attachInterrupt(0, doorStateChange, CHANGE);
  attachInterrupt(1, pirStateChange, FALLING);
}

//////////////////////////////////////
