Send "http://192.168.0.115/A" command through esp 8266

Hello, I had an esp 32 that switches on and off an led if I enter "http://192.168.0.115/A" on my web browser Can I control the led from another esp 8266 connected to the same Lan with the serial monitor. All I really need is to put an HTTP request of "http://192.168.0.115/A". but I cannot figure it out. please help me.

You want your second esp8266 to be a WebClient.... Look at the WebClient example in the Ethernet library. It also applied to wifi

1 Like

see the examples of the ESP8266HttpClent library

1 Like

Hi,
you may like to have a look at my sketch here:
https://github.com/alanesq/BasicWebserver/blob/master/misc/VeryBasicWebserver.ino
specifically the "request a web page" procedure at the end

With this procedure in your sketch you should be able to do it with the command:
String reply = requestWebPage("192.168.0.115","/A",80,200,"");

Note: you may need to remove the "serialDebug" references

1 Like

thank u

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.