Go Down

Topic: connectiong two Wemos d1s to one master Wemos d1. (Read 315 times) previous topic - next topic

Mhdi_kr

Nov 19, 2018, 02:16 pm Last Edit: Nov 19, 2018, 02:31 pm by Mhdi_kr
Hey guys. I want to make 2 Wemos d1s control each other like this:

there's a button and a LED on each of those two Wemos D1s. if i press one button on #1 Wemos, it will wirelessly turn on the other LED on #2 Wemos and vice versa.

Please help me with schematics and the most important part, THE CODES!

thank you all I really appreciate your help :D

wvmarle

Button between GPIO pin and GND, that's all the wiring needed. Enable the internal pull-up resistor & for LED use the built-in one. Done.

Now the more interesting bits: how far apart are they? What communication channel do you plan to use? Based on what do you want switch off the LED?

For the code: there are some blink examples out there that use POST or GET requests to do what you want to do. Look at those. Just have the WeMOS send that specific request to its counterpart upon button press, instead of doing it through a web form.

By the way, your subject mentions a total of three WeMOS devices, the description only two.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Mhdi_kr

thank u so much for the information!! you helped me a lot!
yes, this is my bad and I'm going to explain it in details right now:
the whole thing goes like this ... there are 2 clients and one host. all three are wemos d1s.
there are one led and one button on each of those clients. and there are 2 leds and 2 buttons on the host.
each of those buttons on the host control one client and the button on client controlls its LED on the host.
and these happen in the same house it's not that far away we're not gonna have wireless issues like that.

Go Up