Introduction: Getting Started With ESP8266(LiLon NodeMCU V3) Complete Guide for IoT Startup With Example(as Server)

Picture of Getting Started With ESP8266(LiLon NodeMCU V3) Complete Guide for IoT Startup With Example(as Server)

Things You Need:

  • NodeMCU Flasher Master (Flasher)
  • NodeMCU Firmware (Firmware)
  • Latest Arduino IDE (Arduino)
  • NodeMCU V3
  • Micro USB Cable
  • LED


  • Open-source, Interactive, Programmable, Low cost, Simple, Smart, WI-FI enabled
  • Arduino-like hardware IO
  • Lowest cost WI-FI

Step 1: Installing the Firmware

Picture of Installing the Firmware

In NodeMCU Boards the first thing you need is to install the Firmware to the board

the following method works for all NodeMCU Boards

  1. Open the NodeMCU flasher master folder than open the win32/win64 folder as your computer. now open the folder Release than double click ESP8266Flasher.
  2. Select the COM Port.
  3. Goto config tab
  4. click on the small gear and open up the firmware which you have downloaded
  5. go to the advenced tab and select the desired Baudrate
  6. Goto the Operation tab and click on Flash Button.

Step 2: Preparing the Arduino IDE

Picture of Preparing the Arduino IDE

After Installing the firmware you are ready to do the programming with the ESP8266

  1. Install the Arduino IDE
  2. open the Arduino IDE from the desktop icon
  3. Click on File tab and than open preferences
  4. In the additional Boards Manager URLs add the following link ( and click OK
  5. Goto Tools>Borads>Boards Manager
  6. In the search field type esp8266 click the esp8266 by ESP8266 Community option and click Install

Step 3: Code...

Picture of Code...

Now you can do whatever you want with your NodeMCU board
Following is an example for led blinking with NodeMCU board via webserver

  • In arduino IDE goto tools>Boards>select NODEMCU 1.0 (ESP - 12E Module)
  • again goto tools and select port.
  • Change the Wifi name and password from the following code.
  • Now click on Upload button to upload the following code.
  • Connect the led's positive leg on D9 pin of board and negative to the ground of the code.
  • Power up the board and open the serial monitor from arduino IDE
  • after connecting to the wifi it will show you the IP address.
  • type that IP address on the web browser(Edge, Chrome, Firefox etc..)
  • A webpage will open you can change the status of LED by turning it ON or OFF.

const char* ssid = "Tenda"; //your WiFi Name
const char* password = "12345678";  //Your Wifi Password
int ledPin = 03; 
WiFiServer server(80);
void setup() {
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW); 
  Serial.print("Connecting to ");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
  Serial.println("WiFi connected"); 
  Serial.println("Server started");
  Serial.print("Use this URL to connect: ");

void loop() {
  WiFiClient client = server.available();
  if (!client) {
  Serial.println("new client");
  String request = client.readStringUntil('\r');
  int value = LOW;
  if (request.indexOf("/LED=ON") != -1)  {
    digitalWrite(ledPin, HIGH);
    value = HIGH;
  if (request.indexOf("/LED=OFF") != -1)  {
    digitalWrite(ledPin, LOW);
    value = LOW;
  client.println("HTTP/1.1 200 OK");
  client.println("Content-Type: text/html");
  client.print("Led is : "); 
  if(value == HIGH) {
  } else {
  }  client.println("");  
client.println(" On ");
   client.println(" Off ");  
  client.println(" ");
   Serial.println("Client disonnected");
  Serial.println("");   }
//code copied from link

If you encounter any problem comment it down


rappzoo (author)2017-01-18

Hi, my firmware update does not work. Blue led is blinking when I press FLASH in the programmer but nothing is happening. Waiting MAC... please help me. I'm going crazy:))

BrunoM135 (author)rappzoo2017-10-19


I did not have to press the FLASH button, just programmed out of the Arduino IDE

FajarR1 (author)2016-12-05

Hi, I have a problem on Arduino sketch at "#include"<ESP8266WiFi>, i dunno why it can't be uploaded

BrunoM135 (author)FajarR12017-10-19


The line should read : #include <ESP8266WiFi.h>


sho8c1rkut (author)FajarR12016-12-05

its because you might have not installed esp8266 library in arduino IDE. Try step 2

FajarR1 (author)sho8c1rkut2016-12-06

i've installed the library, maybe i should write "#include<ESP8266WiFi.h> adding ".h" ???

media1328 (author)FajarR12017-02-11

yes FajarR1 you are right. i did too and could upload the sketch

valexandru2 (author)media13282017-05-24

replace < with "

like this


flywire (author)2017-01-19

Can you blink the blue led on the board?

sho8c1rkut (author)flywire2017-10-11

blue LED is on Number 4 pin of the module and you can play with that LED.

TizianoC (author)2017-09-06

hello, I have same board LiLon NodeMCU V3, but I follow this article but not work....after upload firmware ai-thinker- anf then upload skertch not my wifi list there is faryLink:0B68C2 ssdi always present...


About This Instructable




More by sho8c1rkut:Getting Started with ESP8266(LiLon NodeMCU V3) Complete Guide For IoT Startup with example(as server)
Add instructable to: