BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Mega+esp8266+ blynk 2

Hello, I recently purchased a mega+esp8266 board.
There aren’t enough topics about it on Google forums, and all instructions are for the Blynk 1 version.
Looking this video :

During the installation below code on the Blynk 2 version, the problem “invalid auth” appears.

//====================================================
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
//====================================================

//  DEKLARASI AWAL
//====================================================
char auth[] = "*****";
char ssid[] = "*******";
char pass[] = "***";
#define EspSerial Serial3
#define ESP8266_BAUD 115200
ESP8266 wifi(&EspSerial);

//====================================================

BLYNK_WRITE(V2) {
  if (param.asInt()) {
    digitalWrite(10, HIGH);
  }
  else {
    digitalWrite(10, LOW);
  }

}
//====================================================


void setup()
{
  pinMode(10, OUTPUT);
  Serial.begin(115200);
  Serial3.begin(115200);

  delay(10);
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);                          //Reguler server
  //Blynk.begin(auth, wifi, ssid, pass, "192.168.43.120", 8080);    //Local server
}

void loop()
{
  Blynk.run();
  if ( Serial3.available() )   {
    Serial.write( Serial3.read() );
  }
  if ( Serial.available() )       {
    Serial3.write( Serial.read() );
  }

}  ```


I have checked the Blynk forum and did not come across any relevant topics for blynk 2.

Please edit your post and add triple backticks ( ``` ) before and after your whole sketch.

Done

You’re not using the right character, triple backticks look like this ( ``` )

1 Like

This sketch is designed to work with the old blynk, you have to update the library to the latest version ( 1.0.1 ) and Add BLYNK_TEMPLATE_ID and BLYNK_DEVICE_NAME on top of your sketch, above any includes to make it work with the new blynk.

Read this
https://docs.blynk.io/en/blynk-1.0-and-2.0-comparison/migrate-from-1.0-to-2.0

and this
https://docs.blynk.io/en/legacy-platform/legacy-articles/keep-your-void-loop-clean

Dear John,
ESP8266_Lib.h not included in new blynk version? I havent seen any migrating about it in link which you pasted.
On the latest version that “ESP8266_Lib.h” give error that no such dictonary.

I have recomment Pete topic also,

" Dear Pete, Thanks for this topic.
Where is "ESP8266_Lib.h " library?
I am using the latest version of Blynk library, but writing that “ESP8266_Lib.h: No such file or directory”.
On this topic (2016 year) : Where to I find “ESP8266_Lib.h” library?
[vshymanskyy] wrote this - This library will appear in new library release.
For now, just use the latest release: https://github.com/blynkkk/blynk-library/releases/latest

Still not updated library?"

Which, as promised, has been deleted.

You can download the library files from here…

Pete.

Dear Pete,
Your code designed only for arduino UNO?
I have tested for MEGA, esp8266 for all expect UNO write that "error compiling for arduino mega or / (esp8266) .
For arduino UNO write error also, but diffferent error
Serial1 was not declared in this scope

#define BLYNK_TEMPLATE_ID           "TMPLxxxxxx"
#define BLYNK_DEVICE_NAME           "Device"
#define BLYNK_AUTH_TOKEN            "YourAuthToken"

// Send Blynk user messages to the hardware serial port…
#define BLYNK_PRINT Serial 

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

// Define your ESP8266 baud rate:
#define ESP8266_BAUD 38400

// Tell the Blynk library to use the  Hardware Serial port 1 for WiFi..
ESP8266 wifi(&Serial1);

void setup()
{
 // Initialise the debug serial port
 Serial.begin(115200);

 // Initialise the Hardware serial1 port…
 Serial1.begin(ESP8266_BAUD);
 delay(10);

 Blynk.begin(auth, wifi, ssid, pass);
}

void loop()
{
 Blynk.run();
}    ```

You should use the software serial with arduino uno

// or Software Serial on Uno, Nano... 
#include <SoftwareSerial.h> 
SoftwareSerial EspSerial(2, 3); // RX, TX

i need working blynk code for mega + esp8266 which esp8266 installed on mega board.
Strange that that code give error during compiling.

You are NOT uploading the code to the ESP01, so why are you trying to compile tha code for that board type.

The UNO has only one hardware serial port (Serial0), as you will be aware -having studied my serial port tutorial - so it won’t compile for the UNO.

I’d suggest that you post the entire compiler output, by copying and pasting it with triple backticks, rather than posting a screenshot which shows just the last two lines of the compiler output.

Pete.


Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"





















libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::ESP8266(Stream*)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::ESP8266(Stream*)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::checkIPD(String&)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::rx_empty()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::run()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::recvString(String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::recvString(String, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::recvString(String, String, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::recvFind(String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::recvFindAndFilter(String, String, String, String&, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eAT()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::kick()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATRST()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::restart()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATGMR(String&)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getVersion()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATGSLP(unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::deepSleep(unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATE(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setEcho(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATRESTORE()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::restore()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATSETUART(unsigned long, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setUart(unsigned long, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::qATCWMODE(unsigned char*, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getOprMode(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCWMODE(String&)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getWifiModeList()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCWMODE(unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setOprToStation(unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setOprToSoftAP(unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setOprToStationSoftAP(unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::qATCWJAP(String&, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getNowConecAp(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCWJAP(String, String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::joinAP(String, String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCWLAP(String&)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getAPList()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCWQAP()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::leaveAP()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::qATCWSAP(String&, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getSoftAPParam(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCWSAP(String, String, unsigned char, unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setSoftAPParam(String, String, unsigned char, unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCWLIF(String&)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getJoinedDeviceIP()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::qATCWDHCP(String&, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getDHCP(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCWDHCP(unsigned char, unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setDHCP(unsigned char, unsigned char, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCWAUTOCONN(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setAutoConnect(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::qATCIPSTAMAC(String&, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getStationMac(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCIPSTAMAC(String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setStationMac(String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::qATCIPSTAIP(String&, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getStationIp(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCIPSTAIP(String, String, String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setStationIp(String, String, String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::qATCIPAP(String&, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getAPIp(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCIPAP(String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setAPIp(String, unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eCWSTARTSMART(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::startSmartConfig(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eCWSTOPSMART()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::stopSmartConfig()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCIPSTATUS(String&)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getIPStatus()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSTARTSingle(String, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::createTCP(String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::registerUDP(String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSTARTMultiple(unsigned char, String, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::createTCP(unsigned char, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::registerUDP(unsigned char, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSENDSingle(unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::send(unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSENDMultiple(unsigned char, unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::send(unsigned char, unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSENDSingleFromFlash(unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sendFromFlash(unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSENDMultipleFromFlash(unsigned char, unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sendFromFlash(unsigned char, unsigned char const*, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPCLOSEMulitple(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::releaseTCP(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::unregisterUDP(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCIPCLOSESingle()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::releaseTCP()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::unregisterUDP()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATCIFSR(String&)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::getLocalIP()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPMUX(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::enableMUX()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::disableMUX()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSERVER(unsigned char, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::startTCPServer(unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::startServer(unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::stopTCPServer()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::stopServer()'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPMODE(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setCIPMODE(unsigned char)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATSAVETRANSLINK(unsigned char, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::saveTransLink(unsigned char, String, unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::eATPING(String)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setPing(String)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::sATCIPSTO(unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BlynkESP8266-master\ESP8266.cpp.o (symbol from plugin): In function `ESP8266::ESP8266(Stream*)':

(.text+0x0): multiple definition of `ESP8266::setTCPServerTimeout(unsigned long)'

sketch\ESP8266.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board Arduino Mega or Mega 2560.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

You don’t appear to have installed the ESP8266_Lib.h library files correctly, you shouldn’t have them in the the sketch folder, the Blynk library won’t be able to find them correctly when you do this, and as you can see from the error messages this is where the error originate.

Pete.

1 Like

Thanks very much Pete, problem solved.

1 Like

As a result, I want noote. First ESP8266_Lib.h must be installed correctly and the above working code will work in version 2 of the blynk.

Dear Pete,
I’m sorry, I’m stuck in this area again.
Believe me, I have been looking for a solution to this problem for hours.
Even if the compiler succeeds, esp returns an error.
I want to know what this error code mean?!
[1527] ESP is not responding.
I want to inform you that I have updated esp to the latest AT

version.

I also checked the version in this video, with the same settings.

I have tested with mobile hotspot also with regular wifi, same error appearing.

This is my code


#define BLYNK_TEMPLATE_ID "ddd"
#define BLYNK_DEVICE_NAME "ddd"
#define BLYNK_AUTH_TOKEN "ddd"

// Send Blynk user messages to the hardware serial port…
#define BLYNK_PRINT Serial 

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "ddd";
char pass[] = "ddd";

// Define your ESP8266 baud rate:
#define ESP8266_BAUD 38400

// Tell the Blynk library to use the  Hardware Serial port 1 for WiFi..
ESP8266 wifi(&Serial1);
#define led 10  //D2

BLYNK_WRITE(VPIN_BUTTON_0) {
 
   digitalWrite(led, HIGH);
 
 
}

void setup()
{
// Initialise the debug serial port
Serial.begin(115200);

// Initialise the Hardware serial1 port…
Serial1.begin(ESP8266_BAUD);
delay(10);

Blynk.begin(auth, wifi, ssid, pass);
}

void loop()
{
Blynk.run();
} ```