[SOLVED] Bridge widget arduino to arduino on local server

@NickMurray Can you post your bridge code? Some of us still need enlightenment…

I have bridge working by sending an integer from one Arduino Uno to another Arduino Uno on the same Local Server which I have running on a Raspberry Pi. I have not tried setting up a Bridge to send data in the opposite direction but I imagine it would be done in the same way.

To get the bridge working;
On the sending Arduino

  1. You do not need the bridge widget on any dashboard, it is just not required
  2. Before the setup loop —> WidgetBridge bridge1(V1);
  3. Include in the setup loop —> while(Blynk.connect() == false){/*wait until connected*/}
  4. Next in the setup loop—> bridge1.setAuthToken("the_receiving_arduinos_auth_token");
  5. I have a loop that runs one time every second setup using ‘SimpleTimer’ Library
    6)In the one second loop I have —>bridge1.virtualWrite(V1,44);

So for my example I send the value of 44 to Virtual pin1 (V1) of my receiving arduino uno. Obviously I don’t just send a static value of 44 in my actual code but I used that value here to keep it simple.

In the receiving Arduino

  1. Outside of any other loop —>BLYNK_WRITE(V1) {LightValue = param.asInt();}
  2. Inside a 1 second loop —>Blynk.virtualWrite(V25,LightValue);

The value of 44 is handled by the BLYNK_WRITE function where it is written to an integer that I have labelled LightValue then inside a loop that is executed one time every second the LightValue is written to the Blynk App with Blynk.virtualWrite. I display the LightValue on a Value Display Widged that is associated with Virtual Pin V25. In this example it will show the value of 44 on my dashboard

This does work for me. I would like to use the Bridge function more but I have not yet dedicated any more time to it. I would like to send an array of values using the bridge function which I believe is possible but I have not yet been successful in doing that. I hope my description helps you out.

1 Like

Hi there!
Thanks all people involved helping in this topic, I’ve got my first bridge working!!!

A happy dance in honor of you all!! :wink:

2 Likes