Arduino ESP8266 LoLin NodeMCU Getting Started

Use the Arduino IDE to Program your Lolin V.3 NodeMCU V1.0

This tutorial will show you how to use the Arduino IDE to program your LoLin V.3 NodeMCU WIFI board.  The steps are pretty simple to follow and should get your board running in less than a half hour.

If you’re new to  this module,  its fundamentally a System On a Chip (SOC) that includes WIFI ability).   It represents a great starting point to the famliarize yourself with the technologies surrounding the Internet of Things (IoT).

At the end of the end of the tutorial,  you will scan for nearby WiFi networks and display the results on your serial monitor.

Required Parts

You will need a LoLin NodeMCU Module. The module can be found at any of the following vendors:

Amazon     eBay    Bang good     Ali-Express

You will need a micro USB Cable.


Preparing the Arduino IDE to Work with the NodeMCU Module

Don’t get intimidated.  These are relatively painless steps.

Go To ‘Preferences’

Select “Preferences” via the File Menu.



Type “” into the field for ‘Additional Boards Manager URL’.


Access ‘Board Manager’

Select “Boards Manager” via the Tool Menu.


Install the ESP8266 Files

From the boards manager pop up, scroll until you find the esp8266 board.   Select the latest version and install.


Select the NodeMCU V1.0 ESP8266-12E Board

The board is selected via the ‘Tools’ menu.


Select the CPU Frequency and Upload Speed

Match the picture below.


Connect the LoLin NodeMCU Module to your PC

First Time Connecting

If this is your first time connecting your development board, you may simply need to connect the ESP8266-12E module to your computer via a micro USB cable.

Otherwise, there may be a program running that consumes more current than the USB can provide.  In that case, you may want to use connect your own supply.


Second Time Connecting

If your computer USB cannot supply the required power,  you may have to try something else.   You have several options and the are covered HERE.

The configuration I generally use is shown below.



Copy, Paste and Upload the Tutorial Sketch

The sketch is one that comes as an example from ESP8266.COM.

#include "ESP8266WiFi.h"

void setup() {
  // Set WiFi to station mode and disconnect from an AP if it was previously connected
  Serial.println("Setup done");

void loop() {
  Serial.println("scan start");

  int n = WiFi.scanNetworks();// WiFi.scanNetworks will return the number of networks found
  Serial.println("scan done");
  if (n == 0)
    Serial.println("no networks found");
    Serial.println(" networks found");
    for (int i = 0; i < n; ++i)
      // Print SSID and RSSI for each network found
      Serial.print(i + 1);
      Serial.print(": ");
      Serial.print(" (");
      Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*");

  // Wait a bit before scanning again


Open the Arduino Serial Monitor and Verify Operation

If operating properly,  the serial monitor will show the detected WiFi networks and their signal strength.