Flashing ESP8266 with Arduino Uno

Ok thanks I will connect GPIO-0 to GND and try again. I don’t have a USB to Serial/TTL adapter, the only way I can program the ESP at this time is through the arduino. Perhaps I will have to get one.

Alright so my esp8266 is able to connect to blynk and toggle an LED on and off. However it still gives a fatal error when I run terminal on my mac and give a sudo code to flash the esp8266. So is it safe to assume that I am in the clear and just blynk as it is? I guess it may be due to the fact that the SDK version for my ESP8266 is 1.3.0 and the .bin file that was provided in the instructables that I was using was for version 1.0.0. Does this make any difference? If so, then what .bin file would you recommend I can use in order to flash the esp8266.
Thanks for all your help by the way guys!! I really appreciate you guys taking the time out to help a newbie :slight_smile:

@ashwinkumar1994 What did you finally do to get blynk to connect to your ESP 8266?

@smike I had downgraded my arduino to 1.6.5 (but I think it shouldnt matter even with the current versions). Continue as you have using these instructions http://www.instructables.com/id/Connect-to-Blynk-using-ESP8266-as-Arduino-Uno-wifi/

However, instead of flashing the ESp8266, I just didnt connect the GPIO0 pin to the ESP and on the blank sketch I opened up the serial monitor and passed the AT command. You have to experiment with your baud rates and check at which baud rate in the serial monitor you get OK while passing the AT command. Once you get the OK confirmation, I passed this command AT+GMR to check the version of the SDK. Mine was 1.3.0.

After this, upload the ESP8266 example from the BLYNK library, which if you are using the current version, should be labelled as ESP8266_Shield_HardSer . Do that and change Serial 1 to Serial in your code and also update the baud rate in your code with the baud rate where you observed your ESP to work in the previous step. Once this is done, go ahead and upload to your UNO. If you still get an error, then you might have to download the latest version of the BLYNK library which can be downloaded from here. https://github.com/blynkkk/blynk-library/releases/latest

Once downloaded, copy the contents from HardSer to the blynk-library-master folder in your package contents of the arduino ide and upload again. Once this is done, it should hopefully be successful. Then set up your mobile app accordingly and you should be able to control your equipment now.

1 Like

Awesome this seems a lot easier than trying to flash the esp. I will try this as soon as I can. I will post if it works for me or not. Thanks!

Ok so I found the default baud rate of my esp8266 is 9600 and I haven’t changed it so I entered that into ESP8266_Shield_HardSer as well as changing Serial 1 to Serial and putting in my Auth token and Wifi address and password. When I try to upload, I get an error compiling message:

ESP8266_Shield_HardSer.ino:31:29: fatal error: ESP8266_HardSer.h: No such file or directory
compilation terminated.
Error compiling.

Like I said, I am new to this and its probably something simple but I’m not sure what. Thanks for the help so far I appreciate it greatly.

Hi again. As I have mentioned in my previous post. Download the latest blynk library from this site: https://github.com/blynkkk/blynk-library/releases/latest
Now after you download, click on the folder BlynkESP8266_HardSer and copy the contents of this folder to blynk-library-master folder. Once this is done, go back to your code and upload to your board. Now, this should be working hopefully

Ok so I finally got back to this project. I tried what you said, and I’m still getting a compiling error when I try to upload to board.

Arduino: 1.7.8 (Mac OS X), Board: “Arduino Uno”

Using library Blynk in folder: /Users/miclahkoehn/Downloads/Arduino.app/Contents/Java/libraries/blynk-library-master

/Users/miclahkoehn/Downloads/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10708 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/miclahkoehn/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/miclahkoehn/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/Users/miclahkoehn/Downloads/Arduino.app/Contents/Java/libraries/blynk-library-master /var/folders/fn/rv394fp54q5fxghdfcb3b85w0000gn/T/build2953917967256628297.tmp/ESP8266_Shield_HardSer.cpp -o /var/folders/fn/rv394fp54q5fxghdfcb3b85w0000gn/T/build2953917967256628297.tmp/ESP8266_Shield_HardSer.cpp.o
ESP8266_Shield_HardSer.ino:31:29: fatal error: ESP8266_HardSer.h: No such file or directory
compilation terminated.
Error compiling.

I tried moving the ESP8266_Shield_HardSer file to a few different places but no luck. Maybe i do need to flash the esp8266. ??

Thanks

looks like a library issue?

have you check in libraries manager? make sure the file names are all identical, and in your root library folder… you need to restart the IDE to get it to recognize libraries sometimes…

This looks like a library issue. I would try cleaning up your libraries and trying again. Also make sure you have ESP8266_Hardser.h. You should be able to get it here: https://github.com/blynkkk/blynk-library/releases/latest and download: Blynk_v0.3.1.zip

Ok thanks guys. I will try this as soon as I can although it may be a little while as Im going to be away from home. I will post if I get it working. Thanks again :smile:

HI,

maybe this will help to flash your ESP8266 (indeed it helped to flash my modules…)

  • unfortunately it’s only for Mac…

Hint: @ step 12: in the event flashing won’t start, just remove cable from ESP8266 - RST and start flash program again, until it will start…
In my case, flashing started after one RST remove / connect on the first module, on the second one I had to remove / connect / restart program 4 times…

BEFORE I flashed the ESP8266 I wasn’t able to connect my modules to my WLan, after flashing it wasn’t a problem…

cheers and good luck with flashing…

This actually worked for me but now I cannot leave flash mode. :open_mouth: What should I do? Thanks btw! :

@pi926 This is a very old post… please take note of Time/Date stamps before posting.

Also, these are very common questions that can be answered with a basic Google search.
To “leave” flash mode, simply remove the GPIO0 -> GND connection and reboot.