ESP8266: Communication between 3 ESPs

Thread Starter

livelongpranav

Joined Oct 18, 2017
19
Hi guys.
My projects involves 3 ESPs.
First one is AP (Host). On certain actions (which can be anything like pressing button or voice command), I change the value of a variable. I post this value on a webpage. (http://192.168.4.1)
I want the other two ESPs (Clients) to connect to this AP and read the value of variable. Based on the value, I want to set their certain pins high or low.
I know how to set up AP and how to connect other ESPs to it.
But how do I make the two clients read the value of the variable from the host ESP? Either directly or via a web page.
I also want the host to host another web page (or maybe on the same page from where clients will read value) where I can directly change value of variable after connecting to AP via phone or laptop.
 

ErnieM

Joined Apr 24, 2011
8,377
Take a peek at the ESP8266WiFi library. This sounds like you want to create one server that had the data for several clients.

I love the ESP series. Just got two more of the '32's today. Made several Alexa capable things with them.
 

Ya’akov

Joined Jan 27, 2019
9,071
The proposed architecture seems a bit dodgy. You should probably use a publish and subscribe scheme, or even better, just learn and use MQTT for which there are ESP8266 implementations.

If you can't or don't want to use MQTT, then at least PUSH the data to the "slave" nodes using http instead of having them poll.
 
Top