mirror of
https://github.com/thelsing/knx.git
synced 2025-08-22 13:46:21 +02:00
Update knx_facade.cpp
This commit is contained in:
parent
9cbd9a0760
commit
ddcfd2c2ad
@ -1,7 +1,13 @@
|
|||||||
#include "knx_facade.h"
|
#include "knx_facade.h"
|
||||||
|
|
||||||
#include "knx/bits.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
|
#ifdef ARDUINO_ARCH_SAMD
|
||||||
SamdPlatform platform;
|
SamdPlatform platform;
|
||||||
Bau07B0 bau(platform);
|
Bau07B0 bau(platform);
|
||||||
@ -22,12 +28,22 @@ void buttonUp()
|
|||||||
{
|
{
|
||||||
if (knx.progMode())
|
if (knx.progMode())
|
||||||
{
|
{
|
||||||
|
#ifdef ESP8266_WEMOS_D1_R2
|
||||||
|
digitalWrite(knx.ledPin(), HIGH);
|
||||||
|
#endif
|
||||||
|
#ifdef ESP8266_NODE_MCU
|
||||||
digitalWrite(knx.ledPin(), LOW);
|
digitalWrite(knx.ledPin(), LOW);
|
||||||
|
#endif
|
||||||
knx.progMode(false);
|
knx.progMode(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef ESP8266_WEMOS_D1_R2
|
||||||
|
digitalWrite(knx.ledPin(), LOW);
|
||||||
|
#endif
|
||||||
|
#ifdef ESP8266_NODE_MCU
|
||||||
digitalWrite(knx.ledPin(), HIGH);
|
digitalWrite(knx.ledPin(), HIGH);
|
||||||
|
#endif
|
||||||
knx.progMode(true);
|
knx.progMode(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user