Digital Loggers Plduino to Blynk via Esp8266

I have a Plduino. It has a Esp8266 02. on Serial2 on the Mega that its bonded to.
// Hardware Serial on Mega, Leonardo, Micro…
#define EspSerial Serial2

I have flashed the ESP with AT firmware.

I looked at the Plduino schematic and it shows, the RX and TX pins of ESP8266 on 16,17 of the Mega.

I also tried
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(16, 17); // RX, TX

I keep getting.
[604] Connecting to Blynk Sever
[1614] Failed to disable Echo

I have been trying to use the blynk hardware sheild example.

Thank you for any input on this.

This is an old message, first of all, update your Blynk library!

I updated Blynk Library .the ESP is not responding.

Are you sure you installed the last one?

Check again please.

[19]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.4.8 on Arduino Mega

[604] Connecting to Blynk Sever
[1618] ESP is not responding

This is the Serial2, there’s no need to use “sofware serial”, use “hardware serial”.

Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16 (TX); Serial 3: 15 (RX) and 14 (TX)

#define EspSerial Serial2

I still get ESP is not responding

I know the ESP8266 works becasue when I load factory Plduino firmware it produces an AP, and I can connect.

I just cant seem to get it to work with Blynk.

And the rest of code?

Check this example.

https://examples.blynk.cc/?board=Arduino%20Mega%202560&shield=ESP8266%20WiFi%20Shield&example=GettingStarted%2FBlynkBlink

And regarding Baud-rate, did you check the ESP has the same as your code?

how do i post my code properly?

Thank you for your help.

Mate, you should check the “search” tool more often… :wink:

image

#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[] = "075ff68aa34b4e98827ee93c99fa284e";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Blynk Sever";
char pass[] = "12345678";

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

// 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(9600);

  delay(10);

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

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

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

The code seems to be OK for me, what about the Baud-rate for the ESP?

I dont know the baud rate of the ESP, I have tried setting it to 9600 115200 74880, nothing seems to work. I flashed it with NODEMCU flasher and put v1.3.03_ATfirmware.bin on it at 74800. it successfully flashed

I followed this tutorial http://community.mydevices.com/t/connecting-the-plcduino-to-cayenne/3689

this person was able to modify the blynk espsheild example.

This is really important, otherwise your system won’t work…

Below you can find the tool I used to use to flash the ESP8266 when my set-up was using Arduino+ESP:

Give it a try…

I can upload to Dropbox the file used. It should be ok nowadays…
Let me know…

I know for sure my baud rate is 74880. still no luck.

Odd setting, I use #define ESP8266_BAUD 115200 for my MEGA/ESP-01 setup

Then you need to use that same BAUD, that your ESP is set for, in your sketch as well.

In that case, you should change your code:

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

to

// Your ESP8266 baud rate:
#define ESP8266_BAUD 74880
1 Like