#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <Adafruit_FT6206.h>
#include <Adafruit_NeoPixel.h>
#include "OS_Functions.h"
void setup() {
Serial.begin(115200);
Wire.begin();
pixels.begin();
tft.begin();
ts.begin(FT6206_ADDR);
tft.setRotation(0); // adjust the screen rotation as needed
tft.fillScreen(ILI9341_BLACK); // fill the screen with black color
pixels.setPixelColor(0, pixels.Color(255, 255, 255)); // Set the color to white
pixels.show(); // Update the Neopixel with the new color
GUI_Frame("Starting Alarm");
delay(2500);
ChangeCode(false);
GUI_drawArmAlarmButton();
}
void loop() {
if (!AlarmArmed) {
GetMenuPress();
}
if (AlarmArmed && digitalRead(PIN_SENSOR) == HIGH) {
digitalWrite(PIN_BUZZER,HIGH);
Disarm_Alarm();
GUI_drawArmAlarmButton();
}
delay(100);
}