/*
U8g2Lib.h Define
#include <U8g2lib.h>
#include <Wire.h>
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
*/
/*
NeoPixel_Leds Define
#include <FastLED.h>
#define DATA_PIN 13
#define NUM_LEDS 4
CRGB leds[NUM_LEDS];
*/
//Timings
const int Second = 1000 ;
const int Minute = 60 * Second;
const int Hour = 60 * Minute;
const int Day = 24 * Hour;
unsigned long MillisBefore_Ul = 0;
unsigned long ReportTimeInterval_Ul = Minute; // Set the interval to one minute
//Inputs Define
const int PIR_Pin = 14;
int Button_Array[] = {33, 32, 35};
String RGB_Array[3] = {
"Red", "Green", "Blue"
};
//Outputs Define
const int Buzzer_Pin = 27;
const int Relay_Pin = 16;
const int PixelLed_Pin = 13;
int ARGB_Array[] = {33, 32, 35};
String SetupValidInput_String[] = {"ValidCodeLength", "ValidSecretCode", "ValidAlarmTime",};
//Global Variables Define
int CodeLength_Int = 4;
String CodeSecret_String = "1111";
//Admin Code Config Adaption can be inplemented Within Setup 18Characters Currently
String CodeAdmin_String = "1A12AB23ABC34ABCD4";
//Handle_Input Reads
String InputCurrent_String;
String InputBefore_String;
String InputSetup_String;
String AdminInputCurrent_String;
String AdminInputBefore_String;
//Button Keypad
bool ButtonPressed_Bool = 0;
//StateBools
//SetupState
bool AlarmSetupState_Bool = 0;
int ValidInputSelector_Int;
/*
Within DefaultState ==
//Default_SlumberState == 0
//Default_Entering_ArmedState == 1
//Default_ArmedState == 2
//Default_TriggeredState == 3
//Default_PanicState == 4
*/
int DefaultState_Int =0;
//Define Contents Of Row Array and Column Array
int Row_Int[] = {19, 18, 5, 4};
int Column_Int[] = {23, 22, 21, 2};
String Buttons_Array[4][4] = {
{"1", "2", "3", "A"},
{"4", "5", "6", "B"},
{"7", "8", "9", "C"},
{"*", "0", "#", "D"}
};
void setup()
{
Func_Setup();
}
void loop()
{
delay(10);
Func_ReportTimePassed();
Func_ReadKeypad();
Func_ReadSetupState();
// handle_oled();
}