-->
Page 1 of 1

ESP8266 <--> ESP8266 (1 master / 4 slaves) Communication

PostPosted: Wed Jun 07, 2017 3:22 am
by JamesI
Hi All
Hope this is the correct place to post!

As per the pic, Im trying to understand how I can use one 'master' 8266 to send messages to 4 'slave' 8266s (I want to do this to trigger different RGB light sequences on 4 different 8266s)

I am unfortunately a copy/paste guy rather than a coder - Does anyone have any code that they could point me to which achieves this? From what I've read it seems MQTT might be the best option, but I guess other options could be RF or BLE (the master & 4 slaves will nto be in a static environment, so I can't rely on connecting all to the same WiFi AP - unless the master acted as an AP and all 4 slaves connected to that ?)

Image

Would be hugely grateful if anyone could point me in the right direction ?

Many Thanks in advance!

James

Re: ESP8266 <--> ESP8266 (1 master / 4 slaves) Communication

PostPosted: Wed Jun 07, 2017 4:40 pm
by mrburnette
Per your diagram, if the directional arrows are truly one-directional, I would think UDP would be a good solution.

I use UDP to transmit the time-string from an attic GPS to multiple receivers in my home. I have had up to 4 running (3 ESP8266 and 1 PC using Processing to retrieve the UDP string.)

Code:
https://www.hackster.io/rayburne/tardis-time-esp8266-ap-webserver-gps

Good luck,

Ray

Re: ESP8266 <--> ESP8266 (1 master / 4 slaves) Communication

PostPosted: Wed Jun 07, 2017 5:36 pm
by QuickFix
Maybe some kind of mesh network (not restricted to 4 slaves)?

Re: ESP8266 <--> ESP8266 (1 master / 4 slaves) Communication

PostPosted: Thu Apr 08, 2021 3:58 am
by QuickFix
I'm using PainlessMesh at the moment and I believe (I've only tested with 5, or so, nodes at once, max.) there's "No" maximum on the number of nodes, but the latency and propagation can be slow if you're looking for speed.