Add wifi and ota
This commit is contained in:
24
src/main.cpp
24
src/main.cpp
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user