implemented seperate LED

This commit is contained in:
Matthew Frost 2023-06-12 19:57:43 +02:00
parent 429a9d3a01
commit 7214d72d2d
3 changed files with 14 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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