BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Use Blynk.virtualWrite as BLYNK_WRITE?

arduino
#1

Hi friends. is it possible to using Blynk.virtualWrite as BLYNK_WRITE ?

my code is

BLYNK_WRITE(V35)
{
  if (param.asInt()) {
    irsend.sendRaw(irTVpwr, sizeof(irTVpwr) / sizeof(irTVpwr[0]), khz);
    //delay(40);
  }
}
0 Likes

#2

OK. I solved the problem by bridge widget

0 Likes

#3

Can you show an example of how you solved it? I have a similar issue where I wish to update a virtual LED on board 1 with data received from board 2.
Thanks

0 Likes

#4

it’s very simple.

in two MCUs add this code in sketch:

WidgetBridge bridge1(V10);

in primary MCU add this code to sketch:

BLYNK_CONNECTED() {
  bridge1.setAuthToken("second board Token ID");
}

and now you can update virtual pins and hardware pins on second mcu from primary mcu

when primary MCU pin V3 set to 1 then the V35 on secondary MCU set to 1

  Blynk.virtualWrite(V3, 1);
  bridge1.virtualWrite(V35, 1);

don’t forget to add bridge widget to your project :wink:

1 Like

#5

Thanks

1 Like