Using Bridge to Link 2 esp8266-12, to increase useable I/O

THANKS very much for the quick reply on my last question.
The [SOLVED] can two bridged esp8266 = 14 GPIO’s for 1 program?.
Can a sketch for the 2 esp be shown , the main esp and remote esp setup .
If i could see 1 or 2 example of what is on the remote esp , to switch on /off
the digital outputs it would be a start, thanks Barry

following how did you solve this please?

you don’t even need to use bridge, just use the same Blynk code in two individual ESP sketches and then use the Blynk Virtual Pins :slight_smile:

my sketches are massive and would require significant editing for them to be useful for your broad request,

why not show us what you have got and we could advise how to amend the code to suit the two device situation that you are trying to achieve?

So does GPO pin 1 work the same on all devices? with the same sketch? is there a way using virtual pins to control the same pin number using the same code on each device?


i don’t use GPIO designations in the Blynk app, only the virtual ones…

sorry, but i am not very smart, so i cant really help unless you are specific in what you want to achieve…

Lets look at it like this

Unit 1 has IO 1 -6
Unit 2 has IO 1-6

When you setup virtual pins with the same code and you send a command to turn on IO 1 which is Virtual pin 5 it would turn that IO pin on both unit 1 & 2 as they have the same code and receive the same command?

How do you over come this without a bridge?


pretty sure it will!

you use the SAME Blynk auth code

you App has the code so it sends the same Virtual command to what ever device is programmed with that code, either 1 or 100 ESP’s could be having the identical code, but the Blynk app sends just 1 command…

at least - that’s how i think it works…

I guess is a little mistake… It should be same Token, different code, am I right @Dave1829??

yes, the blynk auth “token”

but i also think you can have identical code across multiple devices and one app to control it?

Identical code means identical outputs (in this case) and this won’t work as erasma wants.
I would do something like:


BLYNK_WRITE(V1)  // on-off Digital 1 Switch mode
  if (param.asInt()==1) {
    digitalWrite(D1, HIGH);
  } else {
    digitalWrite(D1, LOW);;


BLYNK_WRITE(V7)  // on-off Digital 1 Switch mode
  if (param.asInt()==1) {
    digitalWrite(D1, HIGH);
  } else {
    digitalWrite(D1, LOW);;

This way when you click at V1 you will use D1 (Esp1) and at V7 you will use D1 (Esp2)

i thought @erasma was after two output change on two device via a single virtual pin?

from this:

Sorry my bad psoro has it the way I want it - and just to confirm that works no problems? that seems so much easier as if it works on one device just change the virtual pins

ah OK, i did mention that i was not very smart :wink:

:joy: to be honest, as English is not my mother tongue I was not sure about the request…really confused… call it good luck!

@erasma, please, next time try to be a little bit more clear…:slight_smile: