Connecting 2 Arduino Minis together

I have an application that needs two separate devices which has a sound sensor, a touch sensor and a push button each, to communicate with each other. Based on each sensor's reading, the mini should send a specific message (can just be an int) to the other unit. The minis are not in a range where I2C is an option. Hence, I want to be using the WiFi to connect them together. Can I achieve this using the ESP8266 module for each?

You'll probably find that just the ESP8266 devices alone will suffice if you choose a breakout with enough pins and there is a library which matches your sensors. That is, you don't need the minis at all. However, if it is true peer to peer information exchange it could be quite complex with ESPs because, I guess one would have to be defined as a Web server, the other a Web client.

Why not serial ? inexpensive TP cable.

6v6gt:
You’ll probably find that just the ESP8266 devices alone will suffice if you choose a breakout with enough pins and there is a library which matches your sensors. That is, you don’t need the minis at all. However, if it is true peer to peer information exchange it could be quite complex with ESPs because, I guess one would have to be defined as a Web server, the other a Web client.

I intend it to be extended to more than two devices eventually. The idea is to sense a touch, button click or sound to send an intended response in the other module and vice versa. So, let’s say we detect a touch, ‘1’ is sent to the other device, if we detect a sound, ‘2’ is sent to the other device & if a button click is detected, ‘3’ is sent. Does the server/client architecture work out for this type of system? And, where can I find more detail to read about IoT, right from the basics? I am new to this. Thank you so much for any suggestions!

knut_ny:
Why not serial ? inexpensive TP cable.

Imagine these devices to be at person A’s house and person B’s house situated far away.

I suppose it all depends how geographically distributed and how responsive the whole thing has to be.

I'd consider a client server architecture if there are to be multiple nodes in your system. The alternative of having lots of peers talking to each other does not scale up nicely. If it is to be geographically distributed, then that anyway rules out small transceiver solutions.

If the wlan/intenet is to be the means of communication between the devices, you'd have a server somewhere, which is accessible from all networks where the clients are located. The clients simply post their sensor results to the main server and also scan the main server to see if there are any events they have to react to.

A practical example would be an internet located Webserver running Apache, mySql and PHP. Clients could could have any IP connection (ethernet/wlan etc.) but let's say ESP8266 based and be located anywhere.

There are also many test/hobby services around. E.g. Thingspeak is mentioned from time to time here, which can be used instead of setting up your own server, but I have no personal experience of these.

6v6gt:
I suppose it all depends how geographically distributed and how responsive the whole thing has to be.

I'd consider a client server architecture if there are to be multiple nodes in your system. The alternative of having lots of peers talking to each other does not scale up nicely. If it is to be geographically distributed, then that anyway rules out small transceiver solutions.

If the wlan/intenet is to be the means of communication between the devices, you'd have a server somewhere, which is accessible from all networks where the clients are located. The clients simply post their sensor results to the main server and also scan the main server to see if there are any events they have to react to.

A practical example would be an internet located Webserver running Apache, mySql and PHP. Clients could could have any IP connection (ethernet/wlan etc.) but let's say ESP8266 based and be located anywhere.

There are also many test/hobby services around. E.g. Thingspeak is mentioned from time to time here, which can be used instead of setting up your own server, but I have no personal experience of these.

Thank you for the detail answer. I am new to getting stuff connected through the internet and I am still learning. Some of the terms you have used are new to me and I will need a bit of reading on that. I did read and hear about Thingspeak and I am exploring that. I shall post again if and when I get further into this. I shall be buying a ESP8266 breakout board soon. Probably the HUZZAH version from adafruit.