BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Read Vpin value with bridge

Hi !

My bridge is working, now i’ve problem. How i can read Vpin value coming from bridge to start function.

Here is my sketch in void relais i want to read V44 who’s humidity value from device2

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "xx";
char ssid[] = "xxx";
char pass[] = "xxxx";

BlynkTimer timer;

//
WidgetBridge bridge1(V1);

//
int minRange = 70;
int maxRange = 80;

void setup()
{
  // Debug console
  Serial.begin(9600);


  Blynk.begin(auth, ssid, pass, IPAddress(10, 3, 141, 1), 8080);
  digitalWrite(2 , LOW);
  delay(1000L);
  digitalWrite(2 , HIGH);
}

void loop()
{
  Blynk.run();
  timer.run();
}

BLYNK_WRITE(V43) { 
  Blynk.virtualWrite(V43, param.asFloat());
}

BLYNK_WRITE(V44) { 
  Blynk.virtualWrite(V44, param.asFloat());
}

void relais ()

{

  if (V44 > minRange)
  {
    digitalWrite(2, HIGH);
  }

  else
  {
    digitalWrite(2, LOW);
  }
}

Thanks

A post was merged into an existing topic: Multi devices eventor