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

Mega + ES8266 + Blynk

Hallo,

i have problems with the following board:

I uploaded the following scatch:

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


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

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Marcel-Wlan";
char pass[] = "*************";

// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial3

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

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  Serial.begin(115200);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

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

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

But there ist always the same issue: [1527] ESP is not responding

DIP 1,2,3,4 are on, and the oder switch on RXD3/TXD3.

Thank you for your help!

PS.: I have already read this: Robotdyn Mega +WiFi R3 ATmega2560+ESP8266

Pete.

How I solved this problem https://gsb-home.blogspot.com/2018/02/mega2560esp8266-blynk.html
The article is written in Ukrainian, but there is a possibility of translation.

First, you have to be sure what default Serial speed your ESP is set and if the AT firmware is loaded and still working.

I also recognize that you use very high Serial speed @ 115200 baud.

/ Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

Normally, the default speed is lower. Many times, it is only 9600 or 38400 bauds.

To find out:

  1. put DIP 1,2,3,4 to OFF, DIP 5,6 to ON. Connect your Mega to USB
  2. Change the speed of your terminal, reset the board. Repeat these steps until you see readable characters.
Ai-Thinker Technology Co.,Ltd.
....

That’s the default speed.

  1. You can test to be sure by just issuing a simple command AT to get a response OK at the terminal as in this picture:

Selection_347

  1. Replace the correct BAUD RATE in the sketch.

If the speed is less than 115200 bauds, you can do some research, then upload a new AT firmware to make it running at 115200 bauds.

Anyway, it’s not easy and advisable to use this MegaWiFi-R3 unless you have absolute reason to use it, such as many more analog/digital I/O pins.