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

How to flash esp01?

Hi everyone, I’m currently trying to control some led’s in my room using the blynk app connected to an esp01 . The problem I’m running into is I cant seem to flash it properly and I cant get it to act as a shield however i have got the blink sketch to work. I’m using a small usb adaptor for the esp01 and soldered a switch on it to get it into and out of dev mode. If someone could point me in the right direction that’d be great :slight_smile:

Because the ESP-01 has a very limited number of pins available, it’s difficult to use it on its own to control things.
It’s usually used as a WiFi modem for other boards that don’t have internet connectivity such as the Arduino Uno and Mega.

I assume from this comment that you are trying to use it as a WiFi modem for something like an Uno or Mega, but you’ve not explained that part, or said how you’ve wired the two together and what code you’re running on the other board.

When you’re using the ESP-01 as a WiFi modem for another board it must be running the original factory firmware, often known as AT firmware because it communicates with the other board via AT commands.
If you’ve uploaded a sketch to the ESP-01 then you’ve overwritten the original AT firmware and it won’t work as a WiFi modem until you’ve re-flashed it with AT firmware. This can’t be done via the Arduino IDE, but if you do some googling you should find a suitable firmware file and re-flashing utility.

Pete.

Hi Pete thanks for replying so quickly. I will attach a picture showing how i have the esp01 wired to with my uno board

and yes I know that I need AT firmware but I’ve tried flashing different firmware’s with a flasher tool which says the flash is successful but when I try an AT command it doesn’t return anything

So how are you sending the AT command to the ESP-01?
Is this with it plugged-in to your USB adapter and typing the command into the IDE’s serial monitor?

I’m told that a for long-term reliable operation you should be powering the ESP-01 from a separate 3.3v power supply, with the GND of that supply connected to GND of the Uno. For initial testing, powering the ESP from the Uno should be fine, although when I’ve done this in the past never used all these resistors.

When I needed to flash an ESP-01 recently I used this method and it worked very well…

Pete.

I’ve clicked the link for the AT firmware but it doesnt exist anymore ;(

I think it’s moved to here:

Pete.

Ok so i flashed it and now I’m getting this code doesnt look good :confused:

Are you sure about 9600 bauds ? not 115200 ?

I tried both options in the serial monitor. i flashed my other esp01 (i have 2) and that ones not showing code weird code lines but its not responding to AT either and i cant seem to be able to type in the putty terminal

This garbage in your serial monitor is because you have the wrong baud rate set in the bottom right hand corner of the serial monitor screen.
The default baud rate for the ESP-01 is usually 115200 or 74880.

All but the latest version of the Arduino IDE will lose the connection to the ESP when you unplug it, so you will need to close and re-open the serial monitor if you unplug the ESP’s USB adapter from your PC.

Pete.

I dont know what that was but i changed it to 74880 and i get this instead

What are the first lined of the serial output, when the ESP first boots?

Pete.

23:02:20.448 -> aFY⸮⸮=0x4010fc17, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
23:02:20.448 -> Fatal exception (0):
23:02:20.448 -> epc1=0x4010fc17, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
23:02:20.448 -> Fatal exception (0):
23:02:20.448 -> epc1=0x4010fc17, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

These are the first few

That doesn’t look like the initial boot message, but maybe it’s just a bad flash,

Pete.

I flashed it multiple times to see if it fixed it. Is there anyway of factory resetting these chips

Yes, by uploading the factory firmware, as you’ve been doing.

Maybe it’s time to order a NodeMCU/Wemos D1 Mini type of device, or an ESP32?

Pete.

1 Like

Hmmm I might have to but before I resort to that is there any other copies of the firmware I could get my hands on?

There are lots of ESP-01 AT firmware versions on the Espressif website, but I think you would need to use the Espressif flash too to upload them, rather than the tool that was linked in the topic I referenced earlier.
The Espressif flash tool is much less intuitive.

If you go down the route of using a WiFi connected board then I can guarantee you’ll never go back to the Arduino and ESP-01 combo again!

Pete.

I have used that tool but I get the same results (no response from at). Truth is I wish I had a wifi board but I already had an Arduino Uno on hand so I just purchased a esp01. I’ll try some of the other espressif firmware versions. Is there any other solutions I should try before changing the board completely

Would a wifi shield for an adruino uno work? i think it may be cheaper than another dev board