REVERSED Relay mode for ESTOP

This commit is contained in:
Matthew Frost 2023-06-21 22:56:33 +02:00
parent 59885577ee
commit 0a5c1a30f6

View file

@ -11,8 +11,12 @@ void unlockDoor(bool silent) {
} }
#endif #endif
#ifdef RELAY1 #ifdef RELAY1
#ifdef RELAY1_REVERSED
controlRelay(RELAY1_PIN,true);
#else
controlRelay(RELAY1_PIN,false); controlRelay(RELAY1_PIN,false);
#endif #endif
#endif
#ifdef SERIAL_DEBUG #ifdef SERIAL_DEBUG
Serial.println("door unlocked"); Serial.println("door unlocked");
#endif #endif
@ -28,8 +32,15 @@ void unlockDoor(bool silent) {
void lockDoor() { void lockDoor() {
#ifdef RELAY1 #ifdef RELAY1
#ifdef RELAY1_REVERSED
controlRelay(RELAY1_PIN,false);
#else
controlRelay(RELAY1_PIN,true); controlRelay(RELAY1_PIN,true);
#endif #endif
#endif
#ifdef SERIAL_DEBUG #ifdef SERIAL_DEBUG
Serial.println("door locked"); Serial.println("door locked");
#endif #endif