mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
39 lines
987 B
Arduino
39 lines
987 B
Arduino
|
#include <knx.h>
|
||
|
|
||
|
void setup()
|
||
|
{
|
||
|
Serial.begin(115200);
|
||
|
ArduinoPlatform::SerialDebug = &Serial;
|
||
|
|
||
|
randomSeed(millis());
|
||
|
|
||
|
// read adress table, association table, groupobject table and parameters from eeprom
|
||
|
knx.readMemory();
|
||
|
|
||
|
// print values of parameters if device is already configured
|
||
|
if (knx.configured())
|
||
|
{
|
||
|
Serial.println("Coupler configured.");
|
||
|
}
|
||
|
|
||
|
// pin or GPIO the programming led is connected to. Default is LED_BUILTIN
|
||
|
// knx.ledPin(LED_BUILTIN);
|
||
|
// is the led active on HIGH or low? Default is LOW
|
||
|
// knx.ledPinActiveOn(HIGH);
|
||
|
// pin or GPIO programming button is connected to. Default is 0
|
||
|
// knx.buttonPin(0);
|
||
|
|
||
|
// start the framework.
|
||
|
knx.start();
|
||
|
}
|
||
|
|
||
|
void loop()
|
||
|
{
|
||
|
// don't delay here to much. Otherwise you might lose packages or mess up the timing with ETS
|
||
|
knx.loop();
|
||
|
|
||
|
// only run the application code if the device was configured with ETS
|
||
|
if (!knx.configured())
|
||
|
return;
|
||
|
}
|