Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By nuesome
#42792 Can someone point me in the right direction for information on connecting 2 esp together via WiFi. What I am trying to accomplish is to have esp1 connected to a pir sensor and when sensor sees motion it will signal esp2 to flash led lights or something. I am lost when it comes to these modules. I do have a little bit of arduino tinkering under my belt. Thanks
User avatar
By nuesome
#47584 OK, I did get this working somehow. I am running esp#1 as webserver using arduino wifiwebserver example. Then, on the other end, I am running esp#2 as a client with pir connected using a modified Wificlientbasic example. When the pir (on esp#2 senses motion, it sends /gpio/0 to esp#1 and turns on the built in led on the esp12e dev board. The problem is that it is a little slow I think because esp#2 keeps connecting and disconecting from the server. My question is, how can I keep client constantly connected to server or am i going about this in the wrong direction. Thanks in advance.
User avatar
By eduperez
#47595 Two questions:

When you say "it is a little slow", how long does the whole process take? how fast you do need it to be?

When you say "esp#2 keeps connecting and disconnecting from the server", do you mean it is disconnecting from the web server at esp#1, or from the wireless access point?

Unless you have a power constraint on esp#2 (does it run on batteries?), you can program it to be always connected to the wireless access point, all depends on your sketch (perhaps you could post it here). If a simple HTTP request is too slow for you, perhaps you could try to use web sockets or UTP.