#include <FastLED.h>
#define DATA_PIN 13
#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 ARGBLedPin_Array[] = {15, 12, 32};
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;
//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 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;
const int Second = 1000;
const int Minute = 60 * Second;
const int Hour = 60 * Minute;
const int Day = 24 * Hour;
const int Year = 360 * Day;
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
const int NillSoundDelay_Int = 27;
bool DrawSolid_Bool = false;
bool ONOFFCurrent_Bool = false;
void setup() {
Func_Setup();
}
void loop() {
// Func_ReportTimePassed();
Func_ReadPanicButton();
Func_ReadKeypad();
Func_SecretCode_Input();
Func_ReadAlarmSwitchCase();
// Func_WriteNeopixel();
delay(25);
}