hello,
I'm quite new to ESP32 Arduino...
Now I'm looking for example to connect a 2nd esp as a client to ESP32 Server.
Given:
ESP32 Webserver generating a website via html, e.g. to switch an LED ON/OFF.
Now I want to connect to a 2nd ESP which is sending values (e.g. of a DHT22 temperature sensor),
and those values should be displayed additionally on the Server's html Website.
Is thre already such an example available?
(edit, moved)
looking for example to connect a 2nd esp as a client to ESP32 Server
Re: looking for example to connect a 2nd esp as a client to ESP32 Server
A search for "Arduino Web Client Post" will produce several examples.
However, 'posting' to the Esp32 'Server' won't have any affect on any pages being accessed from that server unless the posted data is saved on that ESP32 'server' (you didn't say how the server would process the data).
If the data is saved locally on the 'client' node and the 'client' node is, itself a server, then the ESP32 'Server' can access its data whenever it needs to render the data on an accessed page.
However, 'posting' to the Esp32 'Server' won't have any affect on any pages being accessed from that server unless the posted data is saved on that ESP32 'server' (you didn't say how the server would process the data).
If the data is saved locally on the 'client' node and the 'client' node is, itself a server, then the ESP32 'Server' can access its data whenever it needs to render the data on an accessed page.
Re: looking for example to connect a 2nd esp as a client to ESP32 Server
hello,
the ESP32 could host a website like for your SimpleWiFiServer LED on/off example,
plus show an arbitrary anolog value or even a graph/chart for it like in your AdvancedWebServer example.
Then additionally the ESP32 could act as a WebServer to connect to any other ESP Clients.
It might send messages to a ESP client via
webserver.send(200, "text/plain", message);
and perhaps receive and process messages via
webserver.arg("token"),
e.g.
webserver.arg("Client0ADC0")
and the show up that related value on the html website.
But how that finally has to be coded - that actually is the crucial question...
(tbh, I do not even see the difference between a "WifiServer" and a "WebServer")
the ESP32 could host a website like for your SimpleWiFiServer LED on/off example,
plus show an arbitrary anolog value or even a graph/chart for it like in your AdvancedWebServer example.
Then additionally the ESP32 could act as a WebServer to connect to any other ESP Clients.
It might send messages to a ESP client via
webserver.send(200, "text/plain", message);
and perhaps receive and process messages via
webserver.arg("token"),
e.g.
webserver.arg("Client0ADC0")
and the show up that related value on the html website.
But how that finally has to be coded - that actually is the crucial question...
(tbh, I do not even see the difference between a "WifiServer" and a "WebServer")
Who is online
Users browsing this forum: No registered users and 42 guests