FLASHING NODEMCU FIRMWARE IN ESP-12 MODULE

This post is intended to help beginners flash NodeMCU firmware in ESP Modules and thus try lua coding In ESP modules. The steps were tested with ESP-12 based NodeMCU development kit. But the steps are similar for almost all ESP modules available in the market.

113990105 1

No microcontrollers are required to control your ESP. Why use Arduino and unstable AT command interface when you have a 4MB, 80MHz SOC at hand…?? The spec of ESP12 is just amazing and will help to explore the IOT world even faster.

Download links : NODEMCU loader, NodeMCU firmware, ESPlorer IDE for lua scripting.

STEP1

To enable ESP to boot into the firmware mode, connect the GPIO0 pin to ground and restart the module. For NodeMCU development kit Flash button can be pressed and hold while reapplying power to enter bootloader mode.

pin_map

STEP2

Open NODEMCU Flasher. Browse the bin file Configuration tab as below. Select the correct COM port from the config tab. Press flash and wait for the operation to finish

esp2

STEP3

Open ESPlorer IDE. On the right pane click refresh, select the COM port and choose 9600 Baud rate.

openESP

 

STEP4

Write a sample code as follows for turning on an LED connected to GPIO0 of the ESP module.

Copy the code to the script location in ESPlorer IDE. Press send to ESP button to send the code to ESP module. The lua interpreter will execute the code and output of the code can be seen at the right hand side console window.

pin = 1
gpio.mode(pin,gpio.OUTPUT)
gpio.write(pin,gpio.HIGH)
print(gpio.read(pin))

codearea

Congratulations. You have turned on an LED using LUA scripting!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s