|
|
|
|
@ -5,13 +5,16 @@
|
|
|
|
|
#include <ArduinoJson.h>
|
|
|
|
|
|
|
|
|
|
const int deviceId = 0;
|
|
|
|
|
|
|
|
|
|
bool alarmIsTriggered = false;
|
|
|
|
|
bool alarmIsArmed = false;
|
|
|
|
|
bool alarmIsDisarmed = false;
|
|
|
|
|
bool alarmIsArming = false;
|
|
|
|
|
bool alarmIsDisarming = false;
|
|
|
|
|
|
|
|
|
|
unsigned long previousBuzzerMillis = 0;
|
|
|
|
|
unsigned long previousButtonMillis = 0;
|
|
|
|
|
|
|
|
|
|
bool buzzerStatus = false;
|
|
|
|
|
bool lastButtonState = false;
|
|
|
|
|
|
|
|
|
|
@ -197,7 +200,7 @@ void loop()
|
|
|
|
|
if (buttonState != lastButtonState && currentMillis - previousButtonMillis > 500)
|
|
|
|
|
{
|
|
|
|
|
previousButtonMillis = currentMillis;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (buttonState)
|
|
|
|
|
{
|
|
|
|
|
Serial.println("Button pressed");
|
|
|
|
|
|