Bridge does not work for me

I can’t make the BRIDGE work, someone can be kind enough to tell me what’s wrong with this sketch. The main idea is to make PIN 13 work in LOW and HIGH of the second (B or 2) device. This code is in the device (A or 1)

#define BLYNK_PRINT Serial //Comente esto para desactivar impresiones y ahorrar espacio
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
//Su authtoken generado por la aplicacion Blynk
char auth[] = “Token 1 device, send”; //Esp8266 V3

WidgetBridge bridge1(V1);
BLYNK_CONNECTED() {
bridge1.setAuthToken(“Token 2 device, catcher”); // Autotoken de la Tiny principal- Esp8266 NodeMCU


}
char ssid[] = “XXXXXXXXXXX”; //Nombre de la red WIFI
char pass[] = “XXXXXXXXXXX”; //contraseña de la red WIFI

void setup()
{
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
pinMode(5,OUTPUT);
}//End Setup()

void Send(){
int PIND1 = digitalRead(5);

if (PIND1==1)
{
bridge1.digitalWrite(13,LOW);
}
else
{
bridge1.digitalWrite(13,HIGH);
}
}// end Send()

void loop()
{
Send();// llama a ejecutar la función
Blynk.run();
}

Where is your slave code ? (receiver)
Please edit your post to add-in your code with triple backticks at the beginning and end,
else it will be delete.

1 Like