diff --git a/include/hardware.h b/include/hardware.h index e38de41..4aac090 100644 --- a/include/hardware.h +++ b/include/hardware.h @@ -25,8 +25,8 @@ #define LEDCTL_PIN 25 #define DATA0_PIN 26 #define DATA1_PIN 27 - #define RELAY1_PIN 25 - #define RELAY2_PIN 19 + #define RELAY1_PIN 34 + #define RELAY2_PIN 35 #define RELAY_DELAY 3000 #endif diff --git a/src/hardware.cpp b/src/hardware.cpp index 36c6f07..1a7a8eb 100644 --- a/src/hardware.cpp +++ b/src/hardware.cpp @@ -17,6 +17,10 @@ void unlockDoor(bool silent) { Serial.println("door unlocked"); #endif + #ifdef LEDCTL_PIN + digitalWrite(LEDCTL_PIN,LOW); + #endif + #ifdef WEB_SERIAL_DEBUG WebSerial.println("door unlocked"); #endif @@ -30,6 +34,10 @@ void lockDoor() { Serial.println("door locked"); #endif + #ifdef LEDCTL_PIN + digitalWrite(LEDCTL_PIN,HIGH); + #endif + #ifdef WEB_SERIAL_DEBUG WebSerial.println("door locked"); #endif diff --git a/src/main.cpp b/src/main.cpp index e9c062d..1f59dd4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -293,6 +293,10 @@ void setup() { pinMode(DATA0_PIN, INPUT_PULLUP); pinMode(DATA1_PIN, INPUT_PULLUP); + #ifdef LEDCTL_PIN + pinMode(LEDCTL_PIN, OUTPUT); + #endif + #ifdef RELAY1 pinMode(RELAY1_PIN, OUTPUT); #endif