All thing about Nodemcu?

Today in this blog we will try to understand all the basic stuff about Nodemcu.

After reading this full blog you can call yourself an intermediator MicroController expert.

What is NodeMCU used for?                        

NodeMCU is a less price hardware open-source platform. It originally included firmware running on ESP8266 Wi-Fi SoC from Espressif Systems and Hardware based on the ESP-12 module. Later, ESP32 32-bit MCU support was added to make it better. NodeMCU is an open-source firmware in which the design of open-source boards is available for free of cost. The term "NodeMCU" includes "node" and "MCU" (sub-unit unit). The word "NodeMCU" which speaks strongly means firmware rather than compatible development kits/boards. [citation needed] Both firmware board and prototyping are open source resources.

NodeMCU firmware uses the Lua script language. NodeMCU firmware is based on the Lua project and is built on the Espressif Non-OS SDK for ESP8266. NodeMCU uses many open source projects, such as lua-cjson and SPIFFS. Due to resource constraints, users need to select modules that are compatible with their project and build firmware that suits their needs. 32-bit ESP32 support has also been launched.

The most common prototyping hardware is a circuit board that acts as a dual in-line packet (DIP) that includes a USB controller and a small mounted board containing an MCU and antenna. The choice of DIP format allows for easy prototyping on breadboards. The design was originally based on the ESP-12 ESP8266 module, which is a Wi-Fi SoC integrated with the Tensilica Xtensa LX106 core, which is widely used in IoT systems.


Versions of NodeMCU

There are two versions available for NodeMCU as version 0.9 & 1.0 where version 0.9 contains ESP-12 and version 1.0 contains ESP-12E whereas E stands for "Development"

NodeMCU was created after the release of ESP8266. On December 30, 2013, Espressif Systems began production of ESP8266. [12] NodeMCU launched on 13 October 2015, when Hong made the first Nodemcu-firmware file on GitHub. Two months later, the project expanded into an open platform where developer Huang R created a Gerber file for the ESP8266 board, called devkit v0.9. Later that month, the Prime Minister of Tuan installed the MQTT customer library from the Contract to the ESP8266 SoC platform and committed himself to the NodeMCU project, in which NodeMCU was able to support the MQTT IoT protocol, using LQ brua access. Another important update was made on 30 Jan 2015, when Devsaurus added u8glib to the NodeMCU project, enabling NodeMCU to easily drive LCD, Screen, OLED, or VGA.

In the summer of 2015, the first creators abandoned the firmware project and took over a group of independent contributors. In the summer of 2016, NodeMCU installed more than 40 different modules

As Arduino.cc begins to make new MCU boards based on non-AVR processors such as ARM / SAM MCU and used an Arduino Due, they need to convert Arduino IDE to make it easier to change IDE support some tools to allow Arduino C / C ++ to be integrated into these new processors. They did this with the launch of the Board Manager and SAM Core. "Backbone" is a collection of software components required by the Board Manager and the Arduino IDE to create an Arduino C / C ++ source file for MCU machine language. Some ESP8266 enthusiasts have developed the Arduino core of the ESP8266 WiFi SoC, popularly known as the "ESP8266 Core Arduino IDE". This has been a leading software development platform for various modules based on ESP8266 and development boards, including NodeMCUs.


How NodeMCU works?

NodeMCU(Wifi-module/microcontroller) is an open-source IoT platform. Contain software, which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware and software on the basis of the ESP-12 module. The term " NodeMCU by default refers to the software and is not the developer of the suites. The Firmware by using the Lua scripting language. It is based on the eLua project and built into the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as Lua-cjson, and spiffs. The interactive LUA based firmware for the powerful ESP8622 Wi-Fi SoC, as well as the hardware, is an open-source board is of the opinion that, unlike the $3 ESP8266 Wi-Fi modules, includes a CP2102 TTL to USB chip for programming and debugging, the digestion-friendly, and can be powered by micro-USB port. It is an open-source IoT platform. Contain software, which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware and software on the basis of the ESP-12 module. The term " NodeMCU by default refers to the software and is not the developer of the suites. The Firmware by using the Lua scripting language. NodeMCU is based on the eLua project, and built into the Espressif Non-OS SDK for ESP8266. NodeMCU uses many open source projects, such as Lua-cjson, and spiffs. The interactive LUA based firmware for the powerful ESP8622 Wi-Fi SoC, as well as the hardware, is an open-source board is of the opinion that, unlike the $3 or Rs250 ESP8266 Wi-Fi modules, includes a CP2102 TTL to USB chip for programming and debugging, the digestion-friendly, and can be powered by micro-USB port.

  1. Wi-Fi Module – ESP-12E module similar to ESP-12 module but with 6 extra GPIOs.
  2. USB – Micro USB port for power, programming, and debugging(No Type C).
  3. Headers – 2x 2.54mm 15-pin header with access to GPIOs, SPI, UART, ADC, and power pinsMisc – Reset and Flash button.
  4. Power – 5V via micro USB port/Max you can give up to 12v.
  5. Dimensions – 49 x 24.5 x 13mm.

Arduino-like hardware IO!

Advanced API for hardware, I / O, which can dramatically reduce the redundant work for configuring and manipulating hardware. The code is very similar to the Arduino, but interactively in Lua script.The development of the maps, such as the Arduino and Raspberry Pi are the common choices for rapid prototyping of new IoT devices. With this development, the cards are essentially mini-computers that can be connected and programmed on a PC or Mac computer. If it has been programmed, the development of devices that can be connected to sensors and a control field. (You can read more about the plant and the development of the Internet of Things in this article.)

Because the " I " in IoT means Internet access, plus tips for authors who have a connection to the Internet as needed. In the field, it's the best way to connect to the Internet using your wireless network. However, the Arduino and the Raspberry Pi do not have built-in support for wireless networking. Developers will be forced to add a Wi-Fi or a wireless module on the home tab, and in the writing of the code, in order to gain access to the wi-fi module. 


THE following: Support for the reading of the analog input voltage on the A0 output on the NodeMCU board. 

  • HTTP: Support for writing your own code to handle HTTP requests. 
  • SSL / TLS: Support secure HTTPS connections. 
  • MQTT: Support for the MQTT protocol to transmit data to other devices, or the servers that make use of the publish/subscribe model, and with the help of the TCP / IP protocol suite. 
  • Must complete: A practical library for accessing the network, and provides a WebSocket-based solution. 
  • DHT is A handy library to read the data in the DHT family of environmental sensors. 

Custom Settings, Support for a "capture portal," which allows the user to set up their Wi-Fi password without having to hardcode the Wi-Fi credentials to the app's code. 


Firmware for NodeMCU devices 

How to install the esptool Python, a library and use of the software and can be downloaded to your NodeMCU device. 


With the help of Python and pip, run the following command to install the esptool and all of its dependencies. 


sudo pip install esptool 


Connect the NodeMCU to your computer using a USB cable. The blue led on the NodeMCU will flash briefly after the connection. Run the following command to flash the newly downloaded firmware (file name *.bin it in NodeMCU. 


esptool.py --port/dev/cu.SLAB_USBtoUART write_flash -fm=dio -fs=32 м 0x00000 nodemcu-master-set of 10 modules-2017-01-28-02-40-34-float.bin 


On the Mac, the port will be /dev/cu. SLAB_USEtoUART, such as that described above; on Windows, the port COM8; on Linux, the port will be /dev/ttyUSB0.


Which is better Arduino or NodeMCU?

NodeMCU is the best because it has inbuilt WIFI, you can connect NodeMcu to the internet without much effort compared to connecting UNO to the internet, and the best thing is NodeMCU is Arduino compatible you can do all possible stuff that can be done with UNO. We can also program NodeMCU in 'C++' language using Arduino IDE directly

Hardware comparison

  • NodeMCU comes with 128KB RAM and UNO it’s just 2kB RAM so NodeMCU is having more ram space.
  • NodeMCU is having 4MBytes of ROM (flash) and UNO is just 32 KB, NodeMCU can store more code compared to UNO.
  • NodeMCU comes with a micro USB port and UNO comes with a USB type B connector, micro USB cable is easily available to compare to USB type B.
  • NodeMCU development board is smaller in size compared to Arduino UNO.
  • NodeMCU and UNO priced almost the same, so you can opt to buy N

How to test an ESP8266 WiFi module to see that it is working. An ESP-05 module is used in this basic test, but the test should work with any ESP8266 module (ESP-01, ESP-02, ESP-03, ESP-04, ESP-05, ESP-06, ESP-07, ESP-08, etc.).


If you are thinking "I just bought an ESP8266 module and want to hook it up and check that it works" then this is probably the test that you will want to run first.

Testing is done by sending AT commands to the ESP8266 and checking that it responds as expected. AT commands are sent from a terminal window on a PC to the module. An Arduino Due is used to connect the ESP8266 WiFi module to a PC. The Arduino IDE Serial Monitor window is used to send AT commands to the ESP8266 and to see the response from the module.

It is also possible to do the same test using a USB to serial TTL cable such as those offered by FTDI. The commands can then be sent from any serial terminal program.


How to write a program for Nodemcu?ANd setup

Here we will be writing the ESP8266 module 1st program.

To do this you will require some material.
1) An ESP8266 Module 
2) Arduino IDE
3) An led blub

and go to your Arduino ide click on File -> Preferences and past it

In the next step go to Go to “Tools -> Board -> Boards Manager”, type “ESP8266 Module” and install it.

3) Then Go again to Tools -> Board and select your board

We will glow On and off a Blub help of a wifi Module.



In the above Image there you must be able to see GPIO16, GPIO05, etc These all are our Pin numbers, and in Nodemcu Board you must able to see D0, D1, D2, etc all are the onboard pin number of GPIO pin or I/O pin.

Now Take the led and connect in D0 and D1. Already an led is connected to there if you Don't want to purchase an led light

void setup()
{

pinMode(D0, OUTPUT);

}

void loop()

{

digitalWrite(D0, HIGH);

delay(1000);

digitalWrite(D0, LOW);

delay(1000);

}

This is basic code 
This is a Circuit diagram. 
Connect As given in above Circuit.
Then your blue led will Glow.
If you are facing any problem then read this blog from starting or you can google search your problem.

I hope you Have understood. 
Thank you

Post a Comment

0 Comments