Help me ESP8266+Arduino Uno

I have some trouble here, i try to connect my Arduino Uno by ESP8266. Its oke and can connect to my Router but the problem is, in my Blynk Interface any massege that my Arduino is not in Network. Someone can help me for this problem ?

  1. Put your topic in the corresponding category. Otherwise, there is a chance it will not be answered.

We need more details:

  • Have you successfully used ESP8266 without Blynk?
  • What’s your set up?
  • Which mobile OS

I am working on an instructable page to show how to connect to blynk using an esp8266 as an arduino uno wifi shield. My tutorial is only for Mac however. I will add the link when it is done

2 Likes

@nolmath
It’s a great initiative, looking forward to seeing it! Please send me a link when it’s ready. Thanks

Did you finally find the solution?
I have the same problem, no way to make blynk note it.

Although, my ESP8266 is connected to WLAN, and I can see whenever I press interfaze it reacts to it, but for example, the pin 13, when I put a “push button” on the interfaze, it doesnt interact. It doesnt work

1 Like

I gave your tutorial a try and in the end when flashing the ESP I get an error trying to flash the ESP “a fatal error occurred: Failed to connect to ESP8266”. Any help?

It seems to be rooted in the fact that my ESP was a default 9600 baud. I set the ESP to 115200 and no dice. Any way to set the terminal to 9600 baud vs the 115200

FYI AT+GMR
0018000902-AI03

I think you forgot to put ESP in programming mode before trying to flash it.

Take GPIO0 to GND, hit Reset, then flash your module. Remove GPIO0 from GND, hit Reset, your program should be running.
Lookup Kolban’s book on ESP8266, and refer to table on pages 53-54.
http://neilkolban.com/tech/esp8266/

Huh I was having folder permissions issues. Anyhow the ground was there but it finally worked after putting the files in a clean folder

1 Like

Ugh if it’s not one thing it is the other. Now when trying to upload the code I copied and adding my auth and wifi info I get a “‘Blynk’ was not declared in this scope”

Suggestions?

//#define BLYNK_DEBUG

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

#include <ESP8266.h>

#include <BlynkSimpleShieldEsp8266.h>

// Set ESP8266 Serial object

#define EspSerial Serial

ESP8266 wifi(EspSerial);

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = "???";

void setup()

{

   Serial.begin(115200);  // Set console baud rate

  delay(10);

   EspSerial.begin(115200);  // Set ESP8266 baud rate

  delay(10);

  Blynk.begin(auth, wifi, "???",
"???");

}

void loop()

{

  Blynk.run();

}

The file is calling for BlynkSimpleShieldEsp8266.h
(I am removing the @ symbols as this forum gives an error due to the number of users mentioned )
The only thing in the library.h file is

'/**
 * file       BlynkSimpleShieldEsp8266.h
 * author     Volodymyr Shymanskyy
 * license    This project is released under the MIT License (MIT)
 * copyright  Copyright (c) 2015 Volodymyr Shymanskyy
 * date       Jun 2015
 * brief
 *
 */

#ifndef BlynkSimpleShieldEsp8266_h
#define BlynkSimpleShieldEsp8266_h

#error Sorry, we changed things a little bit. Please check new examples for ESP8266. This is easy to fix :)

#endif

The instruction asks me to go to “blynk-library-master” folder. Then, open the “examples” folder. Then, open the “BoardsAndShields” folder. Then, open the “ESP8266_Shield” folder and open “ESP8266_Shield.ino” This should open in your Arduino software.

But this does not exist I have:

ESP8266_Shield_SoftSer
ESP8266_Shield_HardSer
ESP8266_Standalone
ESP8266_DirectConnect

So I am assuming I need to use one of these but what one?

1 Like

** Wrap your code by pressing this magic button (Backtick`) 3 times (before the code and after it):**

This makes your code beautiful with highlighted syntax, like this:

//comment goes here
void helloWorld() {
   String message =  "hello" + "world";
}

You can also select the code and press </> button in the top menu:

1 Like

Should be ESP8266_Shield_HardSer

1 Like

Thank you this has been fixed

2 Likes

Ok get this error then:

    Build options changed, rebuilding all
    In file included from /var/folders/8r/qz0f9z290yxdjwlhbpd68pdc0000gq/T/arduino_a775afb269d3c84f38c6761eee248196/ESP8266_Shield_HardSer.ino:35:0:
    /Applications/Arduino.app/Contents/Java/libraries/blynk-library-master/BlynkSimpleShieldEsp8266.h:14:2: error: #error Sorry, we changed things a little bit. Please check new examples for ESP8266. This is easy to fix :smile:
    #error Sorry, we changed things a little bit. Please check new examples for ESP8266. This is easy to fix :smile:

    exit status 1

Error compiling.

If I try and use the default code and not replace I get

/Applications/Arduino.app/Contents/Java/libraries/blynk-library-master/examples/BoardsAndShields/ESP8266_Shield_HardSer/ESP8266_Shield_HardSer.ino:31:29: fatal error: ESP8266_HardSer.h: No such file or directory
 #include <ESP8266_HardSer.h>
                             ^
compilation terminated.
exit status 1
Error compiling.

Searching the last blynk-library-master I see ‘ESP8266_HardSer.h’ this does not exist

You need to download the newest version of the blynk library

I have downloaded it from here https://github.com/blynkkk/blynk-library/releases/tag/v0.3.1

I see the folders were in the wrong location but this still puts me into the problem of using the code from the tutorial giving me a error (below code)

//#define BLYNK_DEBUG

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

#include <ESP8266.h>

#include <BlynkSimpleShieldEsp8266.h>

// Set ESP8266 Serial object

#define EspSerial Serial

ESP8266 wifi(EspSerial);

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = "???";

void setup()

{

 Serial.begin(115200);  // Set console baud rate

 delay(10);

 EspSerial.begin(115200);  // Set ESP8266 baud rate

 delay(10);

 Blynk.begin(auth, wifi, "???",
"???");

}

void loop()

{

 Blynk.run();

}




Build options changed, rebuilding all
In file included from /var/folders/8r/qz0f9z290yxdjwlhbpd68pdc0000gq/T/arduino_a775afb269d3c84f38c6761eee248196/ESP8266_Shield_HardSer.ino:35:0:
/Applications/Arduino.app/Contents/Java/libraries/blynk-library-master/BlynkSimpleShieldEsp8266.h:14:2: error: #error Sorry, we changed things a little bit. Please check new examples for ESP8266. This is easy to fix :)
 #error Sorry, we changed things a little bit. Please check new examples for ESP8266. This is easy to fix :)
  ^
exit status 1
Error compiling.

This needs to be the hardSer .h one instead

2 Likes

WHOOT! Since this has been a PIA right from the start :slight_smile:
Thank you all for being patient with me!

UPDATE: Ignore below I needed to switch the tx and rx

Im off to finding more issues to bug people about but this thread is done :slight_smile:

The next thing to work out is in the SerialConsole I see it is not connecting

[19] Blynk v0.3.2-beta
[520] Connecting to MountainWave2
ATE0
[1531] Failed to disable Echo
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE

Triple checked the password and name of the WiFi so that is not the issue

This has been a common problem. I also occasionally struggle with this. It could be a number of things. But bear wth me because I’m a mechanical engineer not an electrical engineer so I’m not sure if these are actually the causes of that error:

  1. Make sure you take the esp out of flash mode.

  2. Make sure TX of arduino goes to RX of esp and visa versa

  3. You need to give the esp a break and let it cool off. It takes a lot of power so take a break and come back to it. (This has worked for me multiple times)

  4. You may need to get a more stable power source for the esp. It draws a LOT of current and requires 3.3 V. I use a 5-3.3V LDO voltage regulator with 100nF and 1000nF capacitors to drop the 5v arduino supply to a stable 3.3v. This has kept my esp running smoothly non-stop for over 2 months now.

4 Likes