At last there is WHITE SMOKE. It is necessary to have some code at the receiving end of the bridge to catch the incoming messages. (like in Roffey’s example)
**
The new code in the receiving side is:
**
BLYNK_WRITE(V21)
{
int slidV21val = param.asInt();
Blynk.virtualWrite(24,slidV21val);
}
BLYNK_WRITE(V22)
{
int slidV22val = param.asInt();
Blynk.virtualWrite(23,slidV22val);
}
My code for the transmitting side is:
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = “054d0c9abdad4ea79999464132ec3b7a”;
WidgetBridge bridge1(V30); //Bridge widget on virtual pin v30
SimpleTimer timer;
bool aanuit = false;
bool aanuit1 = false;
int val = 0;
int val1 =1024 ;
WidgetLED led13(V13);
WidgetLED led14(V14);
WidgetLED led15(V15);
void setup()
{
Serial.begin(9600);
delay(5000);
Serial.println(“Start”);
Blynk.begin(auth, “JOKER”, “???”);
Serial.println(“Start”);
while (Blynk.connect() == false) {
// Wait until connected
}
delay(1000);
bridge1.setAuthToken(“967741c612dc4706mxmxmb4a5517023470241”);
timer.setInterval(5000L, knipper);
timer.setInterval(2000L, knipper1);
}
void loop()
{
Blynk.run();
timer.run();
yield();
}
void knipper() {
val++;if (val==1023){val=0;}
if (aanuit == true) {
led15.on();bridge1.digitalWrite(2,HIGH);bridge1.virtualWrite(V22,val);aanuit=false;}
else{led15.off();bridge1.digitalWrite(2,LOW);bridge1.virtualWrite(V22,val);aanuit=true;}
}
void knipper1() {
val1–; if (val1==0) {val1=1023;}
if (aanuit1 == true) {
led14.on();bridge1.digitalWrite(5,HIGH);bridge1.virtualWrite(V21,val1);aanuit1=false;}
else{led14.off();bridge1.digitalWrite(5,LOW);bridge1.virtualWrite(V21,val1);aanuit1=true;}
}
My code for the receiving side is:
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = “967741c612dc4706b4asss5517023470241”;
SimpleTimer timer;
bool aanuit = false;
bool aanuit1 = false;
WidgetLED led13(V13);
WidgetLED led14(V14);
WidgetLED led15(V15);
void setup()
{
Serial.begin(9600);
delay(5000);
Blynk.begin(auth, “JOKER”, “???”);
while (Blynk.connect() == false) {
// Wait until connected
}
//bridge1.setAuthToken(“967741c612dc4ddd706b4a5517023470241”);
timer.setInterval(500L, knipper);
timer.setInterval(1000L, knipper1);
}
void loop()
{
Blynk.run();
timer.run();
yield();
}
BLYNK_WRITE(V20)
BLYNK_WRITE(V21)
{
int slidV21val = param.asInt();
Serial.print("slider val v21 = ");
Serial.println(slidV21val);
Blynk.virtualWrite(24,slidV21val);
}
BLYNK_WRITE(V22)
{
int slidV22val = param.asInt();
Serial.print("slider val v22 = ");
Serial.println(slidV22val);
Blynk.virtualWrite(23,slidV22val);
}
void knipper() {
if (aanuit == true) {
led15.on();aanuit=false;}
else{led15.off();aanuit=true;}
}
void knipper1() {
if (aanuit1 == true) {
led14.on();aanuit1=false;}
else{led14.off();aanuit1=true;}
}