Flatten so the repo root is the Arduino sketchbook; the project lives in WeatherPredictor/. Add a collection index README at the root and move the detailed project README into WeatherPredictor/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
15 lines
440 B
C++
15 lines
440 B
C++
#include <ESP8266WiFi.h>
|
|
#include <WiFiManager.h>
|
|
#include "config.h"
|
|
#include "net.h"
|
|
|
|
bool netBegin() {
|
|
WiFiManager wm;
|
|
wm.setConfigPortalTimeout(180); // give up portal after 3 min, run offline
|
|
bool ok = wm.autoConnect(AP_NAME); // opens AP "WeatherPredictor-Setup" if no creds
|
|
return ok;
|
|
}
|
|
|
|
bool netConnected() { return WiFi.status() == WL_CONNECTED; }
|
|
String netIP() { return WiFi.localIP().toString(); }
|