add simple web server for configuration

This commit is contained in:
technyon
2022-03-27 09:41:19 +02:00
parent 38b5af5421
commit 5941a98f7e
4 changed files with 178 additions and 0 deletions

View File

@@ -1,18 +1,22 @@
#include "Arduino.h"
#include "Network.h"
#include "Nuki.h"
#include "WebCfgServer.h"
#include <FreeRTOS.h>
#define ESP32
Network* network;
WebCfgServer* webCfgServer;
Nuki* nuki;
Preferences* preferences;
void networkTask(void *pvParameters)
{
while(true)
{
network->update();
webCfgServer->update();
}
}
@@ -32,10 +36,15 @@ void setupTasks()
void setup()
{
preferences = new Preferences();
preferences->begin("nukihub", false);
network = new Network();
webCfgServer = new WebCfgServer();
nuki = new Nuki("Main Door", 2020001, network);
network->initialize();
webCfgServer->initialize();
nuki->initialize();
setupTasks();