Replies: 1 comment
-
I took the ESP32 The methods are prototyped in the class here arduino-pico/libraries/WebServer/src/HTTPServer.h Lines 99 to 101 in 3cb5c31
|
Beta Was this translation helpful? Give feedback.
-
I took the ESP32 The methods are prototyped in the class here arduino-pico/libraries/WebServer/src/HTTPServer.h Lines 99 to 101 in 3cb5c31
|
Beta Was this translation helpful? Give feedback.
-
I'm trying to use the WebServer library to create a web interface to configure a PicoW-based device. While I'm grateful for the examples provided, I would really appreciate being able to look at other example or documentation on the library functions. I know how to create html pages and serve them from the PicoW, but I'm struggling to understand how to parse and use information from GET or POST requests. Specifically, the examples show calls to a function called "server.on", i.e.:
server.on("/", handleRoot);
I've searched for "server.on" in every file in the WebServer library and cannot find where it is defined. Can anyone help me understand how to use this and other potentially useful library functions? It has to be defined somewhere but I sure haven't been able to find it.
It appears the PicoW library is a subset of a WebServer library developed by Ivan Grokhotkov about 10 years ago for the ESP32, based on similarities noted:
https://github.com/espressif/arduino-esp32/tree/master/libraries/WebServer
I still haven't found an explanation of the server.on function, and since the Pico library looks to be a subset of the ESP32 one, I thought I'd ask for help before going too deeply down that path.
Since my application requires updating variables that are being sent via GET I think it's very basic but will be a good platform for building other web-controlled projects. I've looked at dozens of PicoW projects online but the majority are done with Micropython, and the relatively few done in C++ may not be compatible with the Arduino-Pico Core, which I want to use for other reasons.
Thanks for any examples or suggestions that might be helpful, Bob.
Beta Was this translation helpful? Give feedback.
All reactions