I have a small project going on, got the code working but have a problem. I would like to have one ESP8266 as server and then just add clinets along the way, to receive the same transmission.
My code works for one client, and when i connect another client, that one does not work, and as soon as i disconnect the first one, the second one starts working.
I would like to be able to just add clients and they all connect automatically... perhaps up to 10 or 20, if possible.
Well, i have 3 D1 Mini's, one is transmitter and 2 receivers.
When i plug in one receiver, it works. When i plug in the second one, it does not work. If i unplug the first receiver, the second one starts working.
If i connect both receivers and restart transmitter, it randomly connects one or the other receiver, but never both.
So, when my signal generator generates a signal it gets picked up by the client (transmitter) and transmits it to the server (receiver). When the signal generator outputs HIGH, a LED on the server lights up, if the generated signal is low, LED is OFF...
As i said, once i plug in one server, it works as it should. When i connect the 2nd server, the LED is constantly ON, that is the output is constantly HIGH.
i do not know if its HTTP request problem or joining the network problem
Juraj:
why would the LED go off if you connect a second 'client'?
you don't send 0 or 1, but "sensor1_value"
No, once i connect the second ESP8266 the LED on that 2nd ESP is constantly ON, the first ESP works as its supposed to work. Then, if i unplug the 1st ESP, the 2nd one picks up and works as it should.
My signal is 1Hz, pulses every second so the LEDs on all ESPs connected should blink, and not be always ON or OFF
Many thanks,
Alek
After further research, some things i understand better, keep in mind i am very new to ESP and WIFI communication between them.
It's now clear that i would be able to send data from multiple clients to one server, BUT what i need here is to send the SAME data from one client to multiple servers, perhaps that's why my rig does not work...