mirror of
https://github.com/thelsing/knx.git
synced 2025-08-13 13:46:20 +02:00
Update knx_facade.cpp
This commit is contained in:
parent
24e7c36c20
commit
fc2ebf96f2
@ -2,11 +2,11 @@
|
|||||||
#include "knx/bits.h"
|
#include "knx/bits.h"
|
||||||
|
|
||||||
// definition for connecting the led of the different boards
|
// 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 WeMos D1 R2 board --> GPIO--RESISTOR--LED--GND (high active)
|
||||||
// for example the circuit on NODE MCU board --> GPIO--LED--RESISTOR--VDD
|
// for example the circuit on NODE MCU board --> GPIO--LED--RESISTOR--VDD (low active)
|
||||||
|
|
||||||
//#define ESP8266_WEMOS_D1_R2
|
//#define LED_PIN_HIGH_ACTIVE
|
||||||
#define ESP8266_NODE_MCU
|
#define LED_PIN_LOW_ACTIVE
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAMD
|
#ifdef ARDUINO_ARCH_SAMD
|
||||||
SamdPlatform platform;
|
SamdPlatform platform;
|
||||||
@ -28,20 +28,20 @@ void buttonUp()
|
|||||||
{
|
{
|
||||||
if (knx.progMode())
|
if (knx.progMode())
|
||||||
{
|
{
|
||||||
#ifdef ESP8266_WEMOS_D1_R2
|
#ifdef LED_PIN_HIGH_ACTIVE
|
||||||
digitalWrite(knx.ledPin(), HIGH);
|
digitalWrite(knx.ledPin(), HIGH);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ESP8266_NODE_MCU
|
#ifdef LED_PIN_LOW_ACTIVE
|
||||||
digitalWrite(knx.ledPin(), LOW);
|
digitalWrite(knx.ledPin(), LOW);
|
||||||
#endif
|
#endif
|
||||||
knx.progMode(false);
|
knx.progMode(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef ESP8266_WEMOS_D1_R2
|
#ifdef LED_PIN_HIGH_ACTIVE
|
||||||
digitalWrite(knx.ledPin(), LOW);
|
digitalWrite(knx.ledPin(), LOW);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ESP8266_NODE_MCU
|
#ifdef LED_PIN_LOW_ACTIVE
|
||||||
digitalWrite(knx.ledPin(), HIGH);
|
digitalWrite(knx.ledPin(), HIGH);
|
||||||
#endif
|
#endif
|
||||||
knx.progMode(true);
|
knx.progMode(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user