hey thanks for your reply. i went ahead and tried this myself to no success though. my code is given below. note that the led blinking part may not work but its the incremented numbers that i want to get bridged. and of course the devices are from 2 different projects
Code for device 1:
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp32.h>
char auth[] = "<device 1 auth>"; // new auth
const char apn[] = "www";
const char user[] = "";
const char ssid[] = "AndroidAP4";
const char pass[] = "asdasdasd";
int x = 0;
BlynkTimer sendData;
WidgetBridge bridge1(V100);
BLYNK_CONNECTED() {
bridge1.setAuthToken("<auth token for device 2>"); // Place the AuthToken of the second hardware here
}
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
sendData.setInterval(500, sendCode);
}
void loop() {
// put your main code here, to run repeatedly:
Blynk.run();
sendData.run();
}
void sendCode(){
bool value = false;
bridge1.digitalWrite(2, value);
value = !value;
if(x<1000)
bridge1.virtualWrite(V99, x);
x++;
Serial.println(x);
}
Code for device 2 is:
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp32.h>
WidgetBridge bridge1(V100);
char auth[] = "<device 2 auth>";
const char apn[] = "www";
const char user[] = "";
const char ssid[] = "AndroidAP4";
const char pass[] = "asdasdasd";
int p = 0;
BlynkTimer timer;
BLYNK_CONNECTED() {
bridge1.setAuthToken("<device 1 auth>"); // Place the AuthToken of the second hardware here
}
BLYNK_WRITE(V99){
p = param.asInt();
}
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(2, OUTPUT);
digitalWrite(2, LOW);
Blynk.begin(auth, ssid, pass);
timer.setInterval(500, timerCode);
}
void loop() {
// put your main code here, to run repeatedly:
Blynk.run();
timer.run();
}
void timerCode(){
Blynk.virtualWrite(V13, p);
}