diff --git a/src/knx_facade.cpp b/src/knx_facade.cpp index 361ab5d..a65f0de 100644 --- a/src/knx_facade.cpp +++ b/src/knx_facade.cpp @@ -2,11 +2,11 @@ #include "knx/bits.h" // definition for connecting the led of the different boards -// for example the circuit on WeMos D1 R2 board --> GPIO--RESISTOR--LED--GND -// for example the circuit on NODE MCU board --> GPIO--LED--RESISTOR--VDD +// for example the circuit on WeMos D1 R2 board --> GPIO--RESISTOR--LED--GND (high active) +// for example the circuit on NODE MCU board --> GPIO--LED--RESISTOR--VDD (low active) -//#define ESP8266_WEMOS_D1_R2 -#define ESP8266_NODE_MCU +//#define LED_PIN_HIGH_ACTIVE +#define LED_PIN_LOW_ACTIVE #ifdef ARDUINO_ARCH_SAMD SamdPlatform platform; @@ -28,20 +28,20 @@ void buttonUp() { if (knx.progMode()) { - #ifdef ESP8266_WEMOS_D1_R2 + #ifdef LED_PIN_HIGH_ACTIVE digitalWrite(knx.ledPin(), HIGH); #endif - #ifdef ESP8266_NODE_MCU + #ifdef LED_PIN_LOW_ACTIVE digitalWrite(knx.ledPin(), LOW); #endif knx.progMode(false); } else { - #ifdef ESP8266_WEMOS_D1_R2 + #ifdef LED_PIN_HIGH_ACTIVE digitalWrite(knx.ledPin(), LOW); #endif - #ifdef ESP8266_NODE_MCU + #ifdef LED_PIN_LOW_ACTIVE digitalWrite(knx.ledPin(), HIGH); #endif knx.progMode(true);