From ddcfd2c2ade47a71185a7cb312468e8ff781822d Mon Sep 17 00:00:00 2001 From: Maggyver <46162338+Maggyver@users.noreply.github.com> Date: Sun, 19 May 2019 19:35:15 +0200 Subject: [PATCH] Update knx_facade.cpp --- src/knx_facade.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/knx_facade.cpp b/src/knx_facade.cpp index 3ee68a9..ea1d5af 100644 --- a/src/knx_facade.cpp +++ b/src/knx_facade.cpp @@ -1,7 +1,13 @@ #include "knx_facade.h" - #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 + +//#define ESP8266_WEMOS_D1_R2 +#define ESP8266_NODE_MCU + #ifdef ARDUINO_ARCH_SAMD SamdPlatform platform; Bau07B0 bau(platform); @@ -22,12 +28,22 @@ void buttonUp() { if (knx.progMode()) { + #ifdef ESP8266_WEMOS_D1_R2 + digitalWrite(knx.ledPin(), HIGH); + #endif + #ifdef ESP8266_NODE_MCU digitalWrite(knx.ledPin(), LOW); + #endif knx.progMode(false); } else { + #ifdef ESP8266_WEMOS_D1_R2 + digitalWrite(knx.ledPin(), LOW); + #endif + #ifdef ESP8266_NODE_MCU digitalWrite(knx.ledPin(), HIGH); + #endif knx.progMode(true); } }