#include "rpcWiFi.h" void wifiDebug(AppState *appState) { Serial.printf("online: %d\n", appState->wifiOnline); if (appState->wifiOnline) { Serial.printf("IP: %s\n", WiFi.localIP().toString()); } } void wifiJoin(AppState *appState) { WiFi.mode(WIFI_STA); WiFi.disconnect(); WiFi.begin(WIFI_SSID, WIFI_PASS); while (WiFi.status() != WL_CONNECTED) { Serial.println("connecting..."); delay(5000); } appState->wifiOnline = true; appState->wifiIP = WiFi.localIP(); } void wifiLoop(AppState *appState) { if (appState->wifiOnline) { WiFi.localIP(); } }