-
Notifications
You must be signed in to change notification settings - Fork 2
First_Steps
Mike edited this page Jan 9, 2023
·
2 revisions
In your main.cpp
include the stack with #include "knx.h"
in the first line.
If your platform is supported by the stack it will create automaticly an instance of knx.
Also add some stuff to make the stack work.
#include <Arduino.h>
#include <knx.h>
void setup()
{
//read memory and restore
knx.readMemory();
if (knx.configured())
{
//read parameters and setup your device
}
//start stack
knx.start();
}
void loop()
{
//needed to do knx stuff
knx.loop();
//do nothing if not configured
if (!knx.configured())
return;
//do some stuff if your device is configured
}