I have just recently discovered the ESP8266 and have on order about 20 modules of various sorts to experiment with.
Really loving how the Arduino IDE has a port for this now, as that makes life quite nice for what we are trying to do.
I have been reading some of the posts on this forum, and I found mention of being able to do a Server/Client setup on a single ESP8266 module, and that is exactly what I am trying to do.
For simplicity I will explain what we are trying to achieve.
Around the building we hope to have these ESP8266 modules scattered around, performing various tasks, connected to a central home/business AP Router. I need one of them to be a master (ie a Server) which they can all transmit data to, such as sensor information, and that module can do various things based on the sensor data - turn on relays, display information on an LCD etc. This part I am sure will be no problem.
I however need some of the modules which have sensors on them, to also perform a Server type roll, in the sense the master server can send information to a client and get it to perform some actions, such as turning on a relay. So each device really needs to be a Server/Client in its own right, so they can no only send out information to each other, but receive it too, based on specific situations.
I am just wondering if anyone has attempted this, in any capacity.
I am just starting to look at some code examples, and starting off looking at the WiFiClient and WiFiWebServer examples that ship with the ESP8266 Arduino module in the Arduino IDE. Is it this type of Server I need, and this type of Client?
Whats the difference between the WiFiWebServer example, and the ESP8266 Webserver example?
I will continue to look and try and figure this out. I am very new to using WiFi on microcontrollers, and have never had to think about how it works before.
As I understand it, I would start with the server example and then basically merge in relevant parts of the client, to form the Server/Client module code. I can then have one client talking to another server, then that same one also being a client talking to the master server etc.
Any help on what example does what, and a poke in the right direction would be appreciated. I should be fine to figure out the code once I understand what example is actually doing what function and what the difference is.
Regards
WanaGo