@bwouters
It’s good that you start exploring the libs.
-
Lite (light-weight) here means you don’t need a complicated WiFiManager with callback functions and a lot of memory which is impossible to use on those resource-constraint boards such as Mega.
Depending on how much memory you can spare, you can turn ON or OFF the dynamic params by using
#define USE_DYNAMIC_PARAMETERS true
-
Ex. SSID and PW is fixed to the ugly ESP_AT_**** MyESP_AT_***?
The SSID and PW for Config Portal are configurable by using the function
void setConfigPortal(String ssid = "", String pass = "")
For example, in README
In Configuration Portal Mode
, it starts an AP called ESP_AT_XXXXXX
. Connect to it using the configurable password
you can define in the code. For example, MyESP_AT_XXXXXX
(see examples):
// SSID and PW for Config Portal
String ssid = "Your-Config-Portal-SSID";
String password = "Your-Config-Portal-SSID-PW";
And use the function in setup()
void setup()
{
// Debug console
Serial.begin(115200);
while (!Serial);
//delay(1000);
Serial.print(F("\nStart Mega_ESP8266Shield on "));
Serial.println(BOARD_TYPE);
// initialize serial for ESP module
EspSerial.begin(115200);
ESP_AT_WiFiManager = new ESP_AT_WiFiManager_Lite(&EspSerial, ESP8266_BAUD);
// Optional to change default AP IP(192.168.4.1) and channel(10)
//ESP_AT_WiFiManager->setConfigPortalIP(IPAddress(192, 168, 120, 1));
ESP_AT_WiFiManager->setConfigPortalChannel(1);
// To configure Config Portal SSID and PW
ESP_AT_WiFiManager->setConfigPortal(ssid, password);
ESP_AT_WiFiManager->begin();
}