Bridge to control a relais

Hello. I’m new here. I can’t program well either. I copied most of it out of the forum or from the Sketch Builder. I would like to query an input to ESP 1. If the input is high at ESP 1, ESP 2 should switch an output (relay). Can someone prepare the code for me?

Not “custom made” code… but many of us have supplied examples throughout this forum to help others learn their own coding.

I’d suggest that you start basic and slowly build up.
EG Get ESP1 working as you want (eg read the input, print to Serial Monitor/Blynk Display), then get ESP2 controlling the relay with either a physical button to simulate the input, or a Blynk Button Widget.

Once bot devices are operating as expected then add the bridge code (there should only be 4 or 4 lines of additional code) to send the command from ESP1 to ESP2.

There are lots of examples of the individual aspects of this project all over the forums.

You will learn much more, and have a better understanding of Blynk, if you built it yourself than if you just get given a completed project.

Good Luck

1 Like