If you’re new to the ESP8266 WiFi module, first read my Getting Started Guide with the ESP8266.
You can also checkout my other tutorial on how to create a web server with an ESP8266 running NodeMCU firmware.
Why flashing your ESP8266 module with NodeMCU?
NodeMCU is a firmware that allows you to program the ESP8266 modules with LUA script. And you’ll find it very similar to the way you program your Arduino. With just a few lines of code you can establish a WiFi connection, control the ESP8266 GPIOs, turning your ESP8266 into a web server and a lot more.
Where to buy?
You can click here to compare the ESP-01 Board price at different stores.
Schematics (3.3V FTDI Programmer)
And you can check this page to get an FTDI programmer at the best price.
Wiring:
- RX -> TX
- TX -> RX
- CH_PD -> 3.3V
- GPIO 0 -> GND
- VCC -> 3.3V
- GND -> GND
You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!
Downloading NodeMCU Flasher for Windows
After wiring your circuit, you have to download the NodeMCU flasher. It’s a .exe file that you can download using one of the following links:
You can click here to find all the information about NodeMCU flasher.
Flashing your ESP8266 using Windows
Open the flasher that you just downloaded and a window should appear (as shown in the following figure).
Press the button “Flash” and it should start the flashing process immediately (You might have to change some of the settings on the Advanced tab). After finishing this process, it should appear a green circle with a check icon.
Do you have any questions? Leave a comment down below!
Now I recommend reading how to create a web server with an ESP8266.
Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.
Hey rui.. I got my cube one.. But number 1 on your schematic won’t light up.. The whole 3 led.. Why.
Hi I’m a hobbiest. I have a confusion that for flashing the fimware do I need the FTDI? I mean is there any alernative device to flash the firmware?
Hi Anthony,
Yes that also should work just fine!
Hi Rui,
How many hours will it take to flash ?
I see the blue ring status keeps rotating…never see green light…
And also from FTDI can we give Wifi module 5v ?
Please respond.
Thx
Had the same problem, check your baud rate – usually 9600 and ensure GP 0 is connected to ground. Flashing takes about 5 minutes and you should see the progress on the bar located in center of the window.
You have to reset the ESP while the blue ring status is rotating, just put the pin REST to ground for a while and it willstart the process
Thanks! Worked for me!!
Hello Rui and community,
please may you let me know what you mean by ” You might have to change some of the settings on the Advanced tab”? I tried to flash like discribed on top, it seams to work fine but then when loading/writing to Adress 0-7E00 the 4096Byte an error occurs, looking at the log file a time out seams to be the reason. does anyone let me know how to flash the ESP correctly without this error.
Thank´s alot
Retep
How about Linux
Hello Rui! Nice project!
I will like to know if i use this USB to TTL adapter ( goo.gl/fct9AL ) and i switch it to 3.3 volts it wont burn my ESP8266 right ?
Please answer me!
– Adi
NodeMCU Flasher does not allow upload of other software ??
when you try to upload :nodemcu_20150213: 15% i error
please help
hi
i am new to this module
i am using ubuntu 14 . i have a problem in flashing please help me n tell me the procedure to communicate with module
Hi Sreedhar,
The easiest way to flash the ESP with NodeMCU is using a Windows PC, then you can upload code using the ESPlorer which is multiplaform and it will run on any Operating System.
You can use this Python script to flash your ESP: github.com/themadinventor/esptool
Hi,
I bought the devkit 1.0.
What does flashing do?
What is the state of the kit out of the box? Is it dedicated to work with certain software or it has no bootloader so you flash it to upload the basic firmware?
What are the options to program it? Is there a firmware enables programming the chip with any IDE?
Hi Eagle,
You don’t need to flash your ESP, because your ESP version already comes with NodeMCU installed.
Other ESPs, for example, ESP version 01 comes with a firmware that uses AT commands.
I personally prefer the NodeMCU firmware, because allows you to use the ESP on board microcontroller and make the ESP a standalone device.
If you flash your ESP with NodeMCU, I recommend using the ESPlorer IDE.
OK .. thanks for your reply 🙂
1. nodemcu flash is for esplorer and lua loader, are there other IDEs work with this firmware?
2. How to program it with Arduino IDE?
3. esplorer is showing only com1, how to show other ports?
4. I tried to run this code with lua loader and didn’t work.
while 1 do
gpio.write(4,gpio.HIGH)
tmr.delay(10000)
gpio.write(4,gpio.LOW)
tmr.delay(10000)
end
I can switch the LED on pin 4 with lua control panel commands.
Regards,
You’re welcome!
1) NodeMCU flasher is used to flash your ESP with NodeMCU. ESPlorer and Lua Loader are IDEs to program your ESP with Lua code
2) Here’s how to do that: https://randomnerdtutorials.com/how-to-install-esp8266-board-arduino-ide/
3) Click the refresh button it will show all the available COM ports
4) Have you set the GPIO as an output? Here’s a code example to blink an LED on GPIO 2: https://raw.githubusercontent.com/RuiSantosdotme/Random-Nerd-Tutorials/master/Projects/ESP8266/blink.lua
I hope this helps,
Rui
1. esplorer doesn’t recognize the chip, it keeps
PORT OPEN 9600
Communication with MCU…
Whether it’s com1 or com2.
So, now that’s the issue with esplorer right now.
2. With lua loader, it detects the module and I can control GPIO pins within the software, but I don’t know how to run a code.
Maybe because I’m having the nodemcu devkit with 17 gpio.
The code would be different.
Even with that, my 1st code should work, I don’t know why it doesn’t !!
Hi Rui,
Great work thank you for all you share. I hope you can comment on some experiences I’ve had. I was successful in flashing an ESP-7. Then loaded your led blinking sketch. In your code you specified GPIO4 , and that’s how I coded it. But the led stayed dark. Further investigation showed that GPIO2 was doing the flashing. I don’t understand why that is. Next issue is after uploading the blink sketch, I could not issue any lua commands to the ESP. Did the blink over write part of the nodemcu? Now I am trying to reflash the module, and having problems getting it to work, but had none the first time. Any insite would be greatly appreciated.
Hi John.
GPIO 2 refers to pin number 4.
This is not an error or bug. It’s how the NodeMCU firmware is defined: github.com/nodemcu/nodemcu-firmware#gpio-new-table–build-20141219-and-later
Open that link and go to the “GPIO New Table” section
Hi Rui, John here You’ve helped me so many times I hope you have time to help me again. As said in a previous post, I’ve successfully flashed an ESP7 using the flasher with an ftdi interface. I’ve used that module in your web server with success. Now I have an ESP12 I want to flash and am having trouble. I know the ESP12 is a bit different, and GPIO pin 15 must also be held low, along with GPIO-0. I’ve seen some say GPIO2 must be pulled Hi as well. I’ve tried it both ways without success. What happens is that the ESP12 gets the mac address, starts to write, then after about 20+ write sequences, stops. It appears to stop always at the same spot. The flasher log shows a timeout error.
I’ve looked all over the internet and have seen others with this issue, but never saw a resolution. As always, many thanks for any guidence you may have!
i am also face same problem with ESP-12F any body can help.
Hi Rui,
I tried flashing on two different ESPs, but on both the flashing process gets stuck at about 10% with an “Error:Write flash timeout.”
Do you know what could cause this problem? I already tried with and without external 3.3v power source, different flashers (had exactly the same problem, stuck at around 10%/1024kB). Nothing worked unfortunately.
Hi Freddy,
I’m not sure what it can be. Have you tried to use multiple baud rates? For some reason a few people told me that it solved their problem… https://randomnerdtutorials.com/esp8266-troubleshooting-guide/
I recently found out that it was my FTDI-Chips causing the problem. Using the GPIO serial ports of a Raspberry Pi worked like a charm. Thanks for your helpful tutorials!
Invalid head of packet
Why is this ?
this is what i get each time
Esp8266-01
Hi Rui, great tutorial. I recently bought a cheap NodeMcu (LoLin) dev kit 1.0. I can flash the 0.96 build, ut Esplorer doesn’t recognize the board. Can you give me some advice?
Thank you in advance
Hi Rui, My first project was one of yours, and it used NodeMCU 0.9.6 as the firmware. After some difficulty I finally got the flashing issues resolved, and went on to “bigger and better” things. I have an issue trying to connect to an ESP12 in AP mode. I posted a few questions on the “everything esp8266 forum under chat if you care to look. I was told that I should be using an updated version of NodeMCU. There is a caution in the docs to load esp_init_data_defalt.bin if updating from 0.9.x. I tried doing this via the NodeMCU flasher without success. It did upload but after restarting the module all it did was continuously restart with an output of:
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40100000, len 25644, room 16
tail 12
chksum 0x6d
ho 0 tail 12 room 4
load 0x3ffe8000, len 2256, room 12
tail 4
chksum 0x06
load 0x3ffe88d0, len 8, room 4
tail 4
chksum 0x52
csum 0x52
rf_cal[0] !=0x05,is 0x00
I followed the instructions to the best of my understanding, but obviously something is wrong. Can you help?
Hi Rui.My esp cant get flash with NodeMCu.I also tried after reset.n changed USB port..but nothing works..What may be the cause
Please take a look at this troubleshooting guide: https://randomnerdtutorials.com/esp8266-troubleshooting-guide/
Will flasher send firmware to esp module automatically without need to load or select firmware binary/hex file?
With this NodeMCU version, you shouldn’t need to select or load anything.
It should work out of the box.
Thanks for asking,
Rui
I am new to esp8266
I want to make a robot needs the control of 4 dc motors and 4 servos I want to do it with adafruit motor shield and esp8266
And all controlled through android app
I request you to guide me step by step
I don’t have any tutorial on that exact subject.
Thanks for asking,
Rui
thank you , and i wil bey a book when i am resdy fot it, thank a lot.
HOW MUCH TIME IT TAKE TO INSTAL A FIRMWARE IN NODEMCU V3
Hi.
What do you mean?
Thanks.
Like all sites I come across looking for how to do this you show the board from the component side, only. It’s OK but the pins on mine are, soldered, on the other side so; that was fun.
Still really pleased with the site and have managed to flash it although it has been a long journey.
Also, and I hope I am right here, the Windows flash program must contain the firmware for the esp01s but it took a long time to realise that. Normally I would expect to have a loader program and point to the data file to upload/flash.
I have used a UNO board for the connection to the PC and a separate 3.3v supply and despite this deviation I seem to have flashed successfully.
Now I have, well I think I have, I will be able to move on to my project.
Thank you for this site, it has been really helpful. It does seem to be one of the best for me and this so any stuff above is just what I found difficult on my journey.
Glad it was here.
Hi Martin.
Thank so much for you kind words.
Good luck with your next ESP8266 projects.
Regards,
Sara 🙂
Hi Rui, I use your materials to try to burn firmware for on 8266 for Micropython.
The UPCraft 1.1 doesn’t work. I saw the COM port but I can’t select it. The board work fine with Arduino IDE. Do you have an idea for me?? Thanks!
Hi Eugen.
Can you try using another USB cable?
Regards,
Sara