Add wifi and ota

This commit is contained in:
2025-07-29 17:41:21 +02:00
parent ff442f5650
commit d80a58f72c
7 changed files with 197 additions and 11 deletions

View File

@@ -1,18 +1,22 @@
#include <Arduino.h>
#include "network.h"
#include "ota.h"
#include "wifimanager.h"
Network* network = nullptr;
OTAHandler* otaHandler = nullptr;
// put function declarations here:
int myFunction(int, int);
void setup() {
// put your setup code here, to run once:
int result = myFunction(2, 3);
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Starting Smart RGB ESP32...");
network = new Network("smart-rgb");
otaHandler = new OTAHandler("smart-rgb-ota");
network->registerMDNS();
}
void loop() {
// put your main code here, to run repeatedly:
}
// put function definitions here:
int myFunction(int x, int y) {
return x + y;
otaHandler->poll(); // Handle OTA updates
delay(500);
}