#include <FastLED.h>
#define DATA_PIN 12
#define NUM_LEDS 4
CRGB leds[NUM_LEDS];

//Global Variables Define

String Buttons_StringArray[] = {"Sensor01 " ,"Sensor02 " ,"Panic_Button " ,"Pir_Sensor "};

String AlarmState_StringArray[] = {" -State 0- " , " -State 1- ", " -State 2- ", " -State 3- ", "-State 4-"};
String AlarmStateSubText_StringArray[] = {" -Alarm Off- " , " -Alarm Arming- ", " -Alarm Armed- ", "-Alarm Reset- ", "-Alarm Triggered-"};

bool AlarmStateCurrent_Bool = false;
bool AlarmStateBefore_Bool = true;

const int BuzzerPin_Int = 27;

const int PirsPin_Int = 14;

const int RelayPin_Int = 16;


int ButtonsPin_IntArray[]     = {33, 34, 35};
int ARGBLedPin_IntArray[]     = {15, 17, 32};


int      CodeLength_Int = 4;
String   CodeSecret_String = "1111";

//Handle_Input Reads
String   InputCurrent_String;
String   InputBefore_String;

//Button Keypad
bool ButtonPressed_Bool = false;
bool KeypadButtonPressed_Bool = false;

bool StateChangedCurrent_Bool = false;
bool StateChangedBefore_Bool = true;

bool ArmingOutput_Bool = false;
bool AlarmFlag_Bool = false;

//Define Contents Of Row Array and Column Array
int Row_IntArray[] = {19, 18, 5, 4};
int Column_IntArray[] = {23, 22, 21, 2};

String KeypadButtonsChar_StringArray[4][4] = {
    {"1", "2", "3", "A"},

    {"4", "5", "6", "B"},

    {"7", "8", "9", "C"},

    {"*", "0", "#", "D"}
  };

bool PirSensor_Bool = false;

bool ButtonStates_BoolArray[]       = { true,  true,  true ,};
bool ButtonStatesBefore_BoolArray[] = { false, false, false,};

bool ARGBLedColors_BoolArray []           = { false,   false,  false, false};
bool ARGBLedColorsBefore_BoolArray []     = { true,  true,  true, true};

//Main Alarm State
int AlarmState_Int;
int AlarmStateBefore_Int;

int ArmingTime_Int = 5;
int AlarmTime_Int = 5;

const int Second = 1000;
const int Minute = 60 * Second;
const int Hour   = 60 * Minute;
const int Day    = 24 * Hour;

unsigned long Days;
unsigned long Hours;
unsigned long Minutes;

unsigned long MillisBefore_Ul = 0;
unsigned long ReportTimeInterval_Ul = 5 * Minute;  // Set the interval to 5minutes

bool ONOFFCurrent_Bool = false;


void setup() {

  Func_Setup();

}

void loop() {

  //  Func_ReportTimePassed();

  Func_ReadPanicButton();

  Func_ReadKeypad();

  Func_SecretCode_Input();

  Func_WriteNeopixel();

  Func_ReadAlarmSwitchCase();

  //  Func_ChangeState();

  //  Debug_PrintState_Bool();


  delay(10);

}
$abcdeabcde151015202530354045505560fghijfghij
NOCOMNCVCCGNDINLED1PWRRelay Module