#include <Keypad.h>
#include <LiquidCrystal_I2C.h>
// LCD setup
LiquidCrystal_I2C lcd(0x27, 16, 2);
// Pin assignments
const int buzzerPin = A0;
const int pirPin = 2;
// PIN code (fixed for now)
String storedPIN = "1234";
String inputCode = "";
// System states
bool isArmed = false;
bool disarmCountdown = false;
bool exitDelayActive = false;
unsigned long entryStartTime;
unsigned long exitStartTime;
const int entryDelay = 15000; // 15 seconds
const int exitDelay = 10000; // 10 seconds
// Timing for buzzer
unsigned long lastBeepTime = 0;