Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By mugginsjm
#61836 Anyone help me please.
If you run sketch AutoConnectWithFSparameters all works well, but how do I trigger an "on demand Config Portal" with say a button press. If on button press I run:

WiFiManager wifiManager;
if (!wifiManager.startConfigPortal("OnDemandAP")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
ESP.reset();
delay(5000);
}

then I just get the basic ssid , password web page and not my extended one with mqtt etc.
User avatar
By Usman Ali butt
#63854
mugginsjm wrote:Anyone help me please.
If you run sketch AutoConnectWithFSparameters all works well, but how do I trigger an "on demand Config Portal" with say a button press. If on button press I run:

WiFiManager wifiManager;
if (!wifiManager.startConfigPortal("OnDemandAP")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
ESP.reset();
delay(5000);
}

then I just get the basic ssid , password web page and not my extended one with mqtt etc.


I made a simple diy project and included the same functionality in it. Pressing a push button will led to scan all the available networks. Display them on an html page, chose one network, provide password in html page and click connect to connect to the network. You can find the tutorial herehttp://www.microcontroller-project.com/esp8266-post-data-to-thingspeak-server.html
User avatar
By renegade
#73735 Can somebody offer an example sketch which serves the in memory pages, from the filesystem instead of the ones in memory?

I have read and tried changing the server to a SPIFFS server(https://github.com/r-downing/SPIFFSReadServer) rather than a ESP8266WebServer, but the result is never stable. Please offer an example of how this can be done.

https://github.com/tzapu/WiFiManager/issues/503