Girish Mahajan (Editor)

NodeMCU

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Operating system
  
XTOS

Memory
  
128kBytes

CPU
  
ESP8266(LX106)

Storage
  
4MBytes

NodeMCU

Developer
  
ESP8266 Opensource Community

Type
  
Single-board microcontroller

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 dev 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.

Contents

History

NodeMCU was created shortly after the ESP8266 came out. On December 30, 2013, Espressif Systems began production of the ESP8266. The ESP8266 is a Wi-Fi SoC integrated with a Tensilica Xtensa LX106 core, widely used in IoT applications (see related projects). NodeMCU started on 13 Oct 2014, when Hong committed the first file of nodemcu-firmware to GitHub. Two months later, the project expanded to include an open-hardware platform when developer Huang R committed the gerber file of an ESP8266 board, named devkit v0.9. Later that month, Tuan PM ported MQTT client library from Contiki to the ESP8266 SoC platform, and committed to NodeMCU project, then NodeMCU was able to support the MQTT IoT protocol, using Lua to access the MQTT broker. Another important update was made on 30 Jan 2015, when Devsaurus ported the u8glib to NodeMCU project, enabling NodeMCU to easily drive LCD, Screen, OLED, even VGA displays.

In summer 2015 the creators abandoned the firmware project and a group of independent but dedicated contributors took over. By summer 2016 the NodeMCU included more than 40 different modules. Due to resource constraints users need to select the modules relevant for their project and build a firmware tailored to their needs.

ESP8266 Arduino Core

As Arduino.cc began developing new MCU boards based on non-AVR processors like the ARM/SAM MCU and used in the Arduino Due, they needed to modify the Arduino IDE so that it would be relatively easy to change the IDE to support alternate tool chains to allow Arduino C/C++ to be compiled down to these new processors. They did this with the introduction of the Board Manager and the SAM Core. A "core" is the collection of software components required by the Board Manager and the Arduino IDE to compile an Arduino C/C++ source file down to the target MCU's machine language. Some creative ESP8266 enthusiasts have developed an Arduino core for the ESP8266 WiFi SoC that is available at the GitHub ESP8266 Core webpage. This is what is popularly called the "ESP8266 Core for the Arduino IDE" and it has become one of the leading software development platforms for the various ESP8266 based modules and development boards, including NodeMCUs. For more information on all things ESP8266, check out the ESP8266 Community Forum on GitHub.

The Button

The Button is a Wi-Fi connected push button designed by Peter R Jennings. The Button is designed for single-purpose, internet-enabled functions. When the button is pressed, a connection is made to a web server which will perform the desired task. Applications include a doorbell or panic button.

NodeUSB

NodeUSB is an open IoT platform about the size of a standard USB stick. It was designed to leverage NodeMCU (Lua) for easy programming and has the extra feature of USB capability. It is ideal for Plug-n-Play solutions, allowing easy prototyping for developers.

ijWatch

ijWatch is an open-hardware and open-source Wi-Fi smartwatch, using an OLED screen and running NodeMCU firmware. The author believes it may be the first smartwatch. (As in, the watch itself is fully functional without the pairing of another bluetooth device such as a smartphone.)

Code examples

The NodeMCU repository contains its own collection of elaborate code examples. Besides that the NodeMCU documentation provides small examples for most functions and modules.

HTTP request

Doing something similar using the HTTP module:

References

NodeMCU Wikipedia