[SOLVED] I want to stop here , i do not want to try more with ESP8266

I have spent two day for Arduino Micro + ESP8266 -SP1 + Blynk v3.8. My diagram is the same below one but with Arduino Micro. Finally, i got this result, nothing more.

In the past, I tried Blynk with Linkit One and it was ok. But now I am exhausted with Arduino + ESP8266. Please help me.

My code is below

[CODE]
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#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[] = “my token”;

// Hardware Serial on Mega, Leonardo, Micro…
#define EspSerial Serial1

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

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);

void setup()
{
// Set console baud rate
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);

Blynk.begin(auth, wifi, “ssid”, “password”);

}

void loop()
{
Blynk.run();
} [/CODE]:angry:

What arduino are you using? You show a picture of Nano?

I am using Arduino Micro

Blynk.begin(auth, wifi, “ssid”, “password”);

Shall it not be?:

Blynk.begin(auth, “ssid”, “password”);

By the way? Why do you use the arduino? Would be ESP8266 standalone version not a nice solution? When you need more pins they are a lot of alternatives e.g. Wemos D1, ESPDuino etc.

I started also with using arduino nano + esp8266 + at command via softserial. I want never have this trouble again :smiley:

1 Like

Because i am using ESP8266-sp1, i have to connect to Arduino. Then, I think Blynk.begin(auth, wifi, “ssid”, “password”); is exact. That is example code from Blynk.

if you use hardwere serial you need use this library

#include <ESP8266_HardSer.h>
#include <BlynkSimpleShieldEsp8266_HardSer.h>

it’s working

This is no longer available, there is a new, simpler method. Please update your library…

so @vshymanskyy is the above one that OP is using OK?

i am going to do ESP to Nano soon, so need to know…

Does this thing have two serial interfaces? On a Uno or Nano you can only use one hardware serial interface. I see you use Serial1 port for ESP, but does that actually exist on this board?

edit:

@Costas ok, didn’t know that, tnx :slight_smile:

@Lichtsignaal yes they are like Leonardo’s with the USB as a virtual (CDC) com port and then the onboard com port.

1 Like

I still am looking for other ideas. confirmed again, I am using Arduino Micro + Blynk latest version (v3.8)
Thanks for your help.

Does the actual baudrate on the ESP and the Arduino serial port match? Some ESP’s are out of the box with a setting of 9600, others 115200 and so on. You could check by hooking up the ESP to a USB-Serial convertor and see when it connects to it properly and responds with OK to an AT command.

1 Like

I set baud rate on ESP8266 to 9600, then it responsed OK with command AT. In an other hand, I also tested with Arduino UNO, use software serial in above code but Blynk app show your “Arduino UNO is not in network”.

Did you check this? https://github.com/blynkkk/blynk-library/wiki/ESP8266-with-AT-firmware

1 Like

and you are sure you copied the Auth code across OK?

1 Like

You are right! The first problem which newbies as me usually get is ignoring vendor’s official guide.

From above captured serial monitor, I see that my ESP got an incorrect IP address from DHCP although serial monitor shown “connected to wifi”. It has to be 192.168.0.X as my router. Thus, ESP did not connect exactly to router. After checking AT commands, I revealed that I have to set ESP to client mode and disable it’s DHCP.
Finally, the command helped me having motivation with ESP8266:

AT+CWDHCP=1,1

3 Likes

@abigman

the Solution is simple:
Change your DNS of your router with google DNS : 8.8.8.8 and 8.8.4.4
I Confirm it working, because I’ve experienced this problem.
ESP 8266 ESP12E + Arduino Mega + Blynk v3.8

I do not know why this happened to my ISP.

Inform me if it work.

Thanks

I think that it is not related DNS. I solved with above mentioned solution. Thanks.

Thank you for your information - in fact I still use the old libraries and luckily work it. I only hope that it will work until the “end of the world” because some of the systems I gave my colleagues and me will be difficult to update them.

Thanks. I will include it in next version of library.