Introduction to NodeMCU

Jan 11, 2019 | NodeMCU

NodeMCU is exactly something that the following image indicates. NodeMCU is like a programmable Arduino board, but a lot more than just that. It has inbuilt Wifi and a lot more which I will be covering here and also show you all how to program it.

What is NodeMCU?

NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module. The term “NodeMCU” by default refers to the firmware rather than the development kits. The firmware uses the Lua scripting language. It is based on the eLua project and built on the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as lua-cjson, and spiffs.

Arduino Uno Vs NodeMCU

SpecificationNodeMCUArduino UNO
ConnectorMicroUSBUSB Type B
Operating Voltage3.3V5V
Max Current12mA40mA
Clock Speed80MHz16MHz
GPIO Pins1416
Analog Pins16
Size4.8 x 2.5 CM6.6 x 5.3 CM

Yes, all this in almost the same price of Arduino UNO!

NodeMCU overview and pinout:

A NodeMCU board looks like the following:

And here is the pinout diagram of a NodeMCU board:

Programming the NodeMCU board

Step 1:
Another great thing about the NodeMCU is that it can easily be programmed through the Arduino IDE. So, to get started with the awesome NodeMCU board, first get yourself one ofcourse.

Step 2:
Next, you will need the Arduino IDE. Download it from here if you do not have it already.
(If you already have the Arduino IDE, make sure it is equal or above version 1.8)

Step 3:
Now, open the Arduino IDE and navigate to File > Preferences

A window like below should appear. Now, copy and paste this link in the red marked box shown in the image.

The link:

Step 4:
After the link has been put there, navigate to Tools > Boards > Board Manager

Type and search for “8266” and install the ESP8266 package.

It may take a little time to download and install. But after that has been done, you are ready to also done with your NodeMCU programming environment set up!

Now, let’s test it!

Programming the NodeMCU: LED Blink Project

You program the NodeMCU exactly like Arduino. The same syntax does the same basic things.

So, first of all, implement the following circuit:

Next, connect the MicroUSB cable and connect your NodeMCU to your computer. You should see your board blinking a blue light a few times. That is normal and unlike Arduino, it doesn’t have any indicator to show if it is being supplied power.

Now, from your Arduino IDE, navigate to Tools > Board and select “NodeMCU 0.9(ESP – 12 Module)”.

After that has been down, it is time to write code and upload to your board!

void setup() {
  pinMode(D7, OUTPUT);     // Initialize the D7 pin as an output

void loop() {
  digitalWrite(D7, HIGH);   
  delay(3000);                      // Wait for 3 seconds

  digitalWrite(D7, LOW);  // Turn the LED off by making the voltage LOW
  delay(1000);                    // Wait for 1 seconds

Now, click upload & wait for the code to upload. You should see the blue LED blinking while the code is being uploaded.

Now, after the codes has been uploaded, you should see the LED blinking.

Congratulations! You have successfully learned to program and use NodeMCU!

Someone in BOWRAL bought a
5mW 650nm Red Line Laser Module Focus Adjustable Laser Head 5V Industrial Grade + 1 Item
about 4 hours ago
Someone in POINT CLARE bought a
SOIC8 SOP8 Test Clip with Cable + 2 Adapters for EEPROM 93CXX / 25CXX / 24CXX In-circuit Programming + 1 Item
about 1 day ago
Someone in STRATHFIELD SOUTH bought a
Arduino Nano 3.0 Atmel ATmega328 Mini-USB Board + 1 Item
about 2 days ago
Someone in MT WAVERLEY bought a
Raspberry Pi 3 Model B+
about 2 days ago
Someone in MELBOURNE bought a
5mW 650nm Red Line Laser Module Focus Adjustable Laser Head 5V Industrial Grade + 1 Item
about 2 days ago
Someone in OAKLANDS PARK bought a
about 2 days ago
Someone in GLENWOOD bought a
AM/FM Portable Radio with USB MP3 Player LED Torch 10 Hour Battery Life
about 2 days ago
MT3608 Step-Up Adjustable DC-DC Switching Power Module Boost Converter
Someone in ALKIMOS bought a
MT3608 Step-Up Adjustable DC-DC Switching Power Module Boost Converter
about 3 days ago
Someone in MAYFIELD WEST bought a
ST-Link V2 ST-Link Mini STM In-Circuit Programmer and Debugger for STM8 and STM32 – with Cover + 2 Items
about 3 days ago
Someone in TURRAMURRA bought a
Arduino Nano 3.0 Atmel ATmega328 Mini-USB Board
about 3 days ago
Share This