Bridge causes error message

Hi there
I´m trying to change my code from a Yun board to a wemos d1 mini.

It´s a simple bridge example that performs well using Yun.
But when I compile it using the d1 Board I get this error message:
xtensa-lx106-elf-gcc: error: libraries\Bridge\Bridge.a: No such file or directory

Any idea?

My code:

/**************************************************************
  Detects the status of Garage door by RED switch and
  send´s it to:
  ~ TOR_Receiver which will blink the BUILTIN_LED when door is open
  ~ Blynk APP Tor_Status Value V11
  ~ Blynk APP Tor_Status LED

**************************************************************/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <Bridge.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <MY_WiFi.h> // MY_personal WiFi credentials
#define MY_switch D1

char auth[] = "xxxxxxxx"; //Tor-Status-ESP-D5EFEB
WidgetBridge bridge1(V1); // Bridge widget on virtual pin 1


void setup()
{ pinMode(BUILTIN_LED, OUTPUT);  // initialize onboard LED as output BUILTIN_LED=D4
  pinMode(MY_switch, INPUT_PULLUP);
  delay (1000);
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);

  //********************************************************
  noInterrupts();
  timer0_isr_init();
  timer0_attachInterrupt(timer0_ISR);
  timer0_write(ESP.getCycleCount() + 80000000L); // 80MHz == 1sec
  interrupts();
  //********************************************************
}


BLYNK_CONNECTED() {
  bridge1.setAuthToken("yyyyyyy"); // Place the AuthToken of the second hardware here  Tor-Receiver-ESP-D5F066
}

void loop()
{
  Blynk.run();

  if (digitalRead(MY_switch) == HIGH)
  {
    Serial.println("HIGH");
    bridge1.digitalWrite(4, HIGH);  // Digital Pin 9 on the second board will be set HIGH
    bridge1.virtualWrite(V5, 1); // Sends 1 value to BLYNK_WRITE(V5) handler on receiving side.
    Serial.println(F("write HIGH"));
  }
  else
  {
    Serial.println("LOW");
    bridge1.digitalWrite(4, LOW); // Digital Pin 9 on the second board will be set LOW
    bridge1.virtualWrite(V5, 0); // Sends 0 value to BLYNK_WRITE(V5) handler on receiving side.
    Serial.println(F("write LOW"));
  }
}

BLYNK_WRITE(V5) {  //This is only for example to demonstrate the board is still running
  int pinData = (param.asInt() * 255); // pinData variable
  digitalWrite(BUILTIN_LED, pinData);
}

void timer0_ISR (void) //this is for example only change it to your ISR needs
{
  digitalWrite( BUILTIN_LED, digitalRead( BUILTIN_LED ) ^ 1 ); // blink 1/sec
  timer0_write(ESP.getCycleCount() + 80000000L); // 80MHz == 1sec

}

May be I found it my self.
the include bridge.h is not present within the actual example of bridge
I deleted it in my sketch and could compile with out error message.

I hope that it will now work without the include ???

Where did you get the bridge.h file? It’s not part of the Blynk lib nor is it required.

Bridge.h is for Yun only, it is not part of Blynk Library and it is not related to Bridge Widget

I do not remember where it is from.
I used the blynk examples to perform my first steps together with Yun and blynk.

@vshymanskyy
Sorry but I have to correct you.
But it is provided together with blynk.
When I load the < example < blynk < boards_wifi < Arduino_yun
It will load the sketch like below
and bridge.h is included.

/**************************************************************
 * Blynk is a platform with iOS and Android apps to control
 * Arduino, Raspberry Pi and the likes over the Internet.
 * You can easily build graphic interfaces for all your
 * projects by simply dragging and dropping widgets.
 *
 *   Downloads, docs, tutorials: http://www.blynk.cc
 *   Blynk community:            http://community.blynk.cc
 *   Social networks:            http://www.fb.com/blynkapp
 *                               http://twitter.com/blynk_app
 *
 * Blynk library is licensed under MIT license
 * This example code is in public domain.
 *
 **************************************************************
 * This example shows how to use Arduino Yun Bridge
 * to connect your project to Blynk.
 * Feel free to apply it to any other example. It's simple!
 *
 **************************************************************/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
**#include <Bridge.h>**
#include <BlynkSimpleYun.h>

@Brummer sorry but you’re wrong ))) … so don’t correct me this time.

@brummer, hopefully our online example browser will help you to mix examples together

@Brummer Bridge.h is a standard Arduino library that just happens to be used by the Yun but it has no relation to Blynk’s Bridge widget.

1 Like

@Costas,
thank you for your clarification.
@vshymanskyy
sorry for my mistake, because it has been provided together with the yun blynk example I assumed that it uses to blynk.

Yes, but it is really needed on Yun, but not for Blynk Bridge. Glad you got the idea…

1 Like