I have developed an ESP8266 sketch based on a RNT sketch to control 3 LEDs using WiFiClient. I’ve now added a 2nd web page to collect config variables from an HTML form. I have the URL in a string (http://192.168.104.127/get?DST_ACTIVE=on&PIR_TIME=12&GGE_PIR=on&GGE_LDR=on&GGE_TIME=on&GGE_OFF=on&CLH_PIR=on&CLH_LDR=on&CLH_TIME=on&CLH_OFF=on&GDN_PIR=on&GDN_LDR=on&GDN_TIME=on&GDN_OFF=on&LIGHTS_ON_TIME=23&LIGHTS_OFF_TIME=34&LDR_THRESHOLD=45), but I’m stuck on how to obtain the params & their values as most examples require server.arg – not supported by WiFiClient?
Hi Sara,
I cannot find that tutorial now, it was an old one – displayed two oval buttons, grey for off and red for on and used /1/off, /1/on, /2/off, /2/on to switch switch the associated gpios. There was no web form in that tutorial… Anyhow, between the tutorials on the RNT site, the ebooks I’ve got from you guys, the ESP8266 Beginners Guide (GitHub), I’ve been able to move past that issue – eventually – and the config variables have been successfully written to a LittleFS file.
A completely different question if I may. I’d like to implement OTA updates, as the controller will be in a box mounted high up and not readily accessible. From your “Build Web Servers” ebook, it gives examples for OTA using AsyncWebServer. As I’m using WIFiClient, that is unlikely to work. The ebook does mention 3 methods and focuses on the Async as the simplest. Can OTA be accomplished using WifiClient? Or do I need to rewrite the entire sketch using Async?
Many thanks,
Nigel.
Hi.
Yes. I believe this method should be compatible: https://randomnerdtutorials.com/esp8266-ota-updates-with-arduino-ide-over-the-air/
This tutorial is quite old and I haven’t tested it recently, so I’m not sure. But I think it’s worth giving it a try.
Regards,
Sara
Fantastic! Thank you Sara. I’m using PlatformIO, so after a little tweaking with the ini file, it works a treat.
Kind regards,
Nigel.