Smart Camera ESP32
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
WifiManager Class Reference

Handles asynchronous WiFi connection and automated reconnection logic. More...

#include <wifi_manager.h>

Static Public Member Functions

static void connect (const String &ssid, const String &password)
 Initiates an asynchronous connection to a WiFi access point.
 
static bool is_connected ()
 Polls the WiFi hardware for current connection status.
 
static String get_ip ()
 Returns the local IPv4 address as a string.
 
static void maintain ()
 Heartbeat function. Checks if WiFi has diconnected, if so, attempts to reconnect.
 

Detailed Description

Handles asynchronous WiFi connection and automated reconnection logic.

Member Function Documentation

◆ connect()

void WifiManager::connect ( const String & ssid,
const String & password )
static

Initiates an asynchronous connection to a WiFi access point.

Sets mode to WIFI_STA and disables sleep modes for better hardware stability.

Parameters
ssidService Set Identifier of the network.
passwordkey for the network.

◆ get_ip()

String WifiManager::get_ip ( )
static

Returns the local IPv4 address as a string.

Returns
String formatted IP (e.g. "192.168.1.50") or "0.0.0.0" if unavailable.

◆ is_connected()

bool WifiManager::is_connected ( )
static

Polls the WiFi hardware for current connection status.

Returns
true if currently connected to an AP with a valid IP.

◆ maintain()

void WifiManager::maintain ( )
static

Heartbeat function. Checks if WiFi has diconnected, if so, attempts to reconnect.

Monitors connection health. If the connection is lost, it manages throttle-controlled reconnection attempts to avoid CPU spikes.


The documentation for this class was generated from the following files: