implemented seperate LED
This commit is contained in:
parent
429a9d3a01
commit
7214d72d2d
3 changed files with 14 additions and 2 deletions
|
@ -25,8 +25,8 @@
|
||||||
#define LEDCTL_PIN 25
|
#define LEDCTL_PIN 25
|
||||||
#define DATA0_PIN 26
|
#define DATA0_PIN 26
|
||||||
#define DATA1_PIN 27
|
#define DATA1_PIN 27
|
||||||
#define RELAY1_PIN 25
|
#define RELAY1_PIN 34
|
||||||
#define RELAY2_PIN 19
|
#define RELAY2_PIN 35
|
||||||
#define RELAY_DELAY 3000
|
#define RELAY_DELAY 3000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,10 @@ void unlockDoor(bool silent) {
|
||||||
Serial.println("door unlocked");
|
Serial.println("door unlocked");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LEDCTL_PIN
|
||||||
|
digitalWrite(LEDCTL_PIN,LOW);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WEB_SERIAL_DEBUG
|
#ifdef WEB_SERIAL_DEBUG
|
||||||
WebSerial.println("door unlocked");
|
WebSerial.println("door unlocked");
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,6 +34,10 @@ void lockDoor() {
|
||||||
Serial.println("door locked");
|
Serial.println("door locked");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LEDCTL_PIN
|
||||||
|
digitalWrite(LEDCTL_PIN,HIGH);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WEB_SERIAL_DEBUG
|
#ifdef WEB_SERIAL_DEBUG
|
||||||
WebSerial.println("door locked");
|
WebSerial.println("door locked");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -293,6 +293,10 @@ void setup() {
|
||||||
pinMode(DATA0_PIN, INPUT_PULLUP);
|
pinMode(DATA0_PIN, INPUT_PULLUP);
|
||||||
pinMode(DATA1_PIN, INPUT_PULLUP);
|
pinMode(DATA1_PIN, INPUT_PULLUP);
|
||||||
|
|
||||||
|
#ifdef LEDCTL_PIN
|
||||||
|
pinMode(LEDCTL_PIN, OUTPUT);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RELAY1
|
#ifdef RELAY1
|
||||||
pinMode(RELAY1_PIN, OUTPUT);
|
pinMode(RELAY1_PIN, OUTPUT);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue