Updated 24 September 2020
Kits and Gadgets Electronics Inc.
Farwaniya, Kuwait 80003
Kuwait
ph: +965 99571844
kits
What is NodeMCU?
Many years ago, a tiny microcontroller board that can connect and be controlled through the internet is not available for the hobbyists and electronic enthusiasts. New technology came and the popularity of Wi-Fi gave an opportunity to manufacturers to develop the device that can be integrated with appliances and various automation and robotic projects.
The success of Arduino and Raspberry Pi boards has created somewhat a kind of competition among electronic manufacturers to design boards that can compete with these two popular boards in terms of cost and functionality. This is why the NodeMCU was born.
Now, almost anyone with the knowledge of electronics can embark on building their own robot and house automation without spending so much money by utilizing the NodeMCU microcontroller unit board or development kit.
The NodeMCU is the smallest among microcontroller boards and probably the cheapest with built-in wi-fi. There are several disadvantage though compare to Arduino and Raspberry Pi. It has has fewer GPIO ports, no HDMI and camera terminals and and USB port. It cannot be considered as a computer board like Raspberry Pi.
Basically, NodeMCU is intended for Internet of Things or IoT and this is the main reason why more GPIOs and interface ports are considered not essential.
Since this device is specifically designed to be integrated with electrical equipments and to control appliances, complexity of application and programming are also simplified. It can be programmed using the Arduino IDE or Lua IDE.
The NodeMCU boards that are available in the market have some minor differences in terms of form factor, parts configuration and color since they are produced by different manufacturers but generally all works the same.
An example shown below is just one of the several configurations one can possibly buy in an online store.
PIN CONFIGURATION
PROGRAMMING USING ARDUINO IDE
PARTS NEEDED:
1. NodeMCU Board
2. Breadboard
3. Jumper Cables
4. LED
5. Resistor - 1 Kilohms
6. USB Cable
PROCEDURE:
1. Download the Arduino IDE.
2. Open the Preferences and copy this URL (http://arduino.esp8266.com/stable/package_esp8266com_index.json) to Additional Boards Manager as shown below.
3. Open the Tools drop-down menu and select Board Manager.
4. You should see the window below after clicking the Board Manager.
5. Scroll down and download/install the ESP8266 Package.
6. Go back to Tools drop-down menu and select the board NodeMCU or Wemos D1 R2 and mini to be programmed.
7. Assemble now the parts needed for the experiment according to the
diagram below. It will be more convenient to use a breadboard for this
experiment instead of soldering to interconnect each component.
8. Now that you already have the NodeMCU driver in Arduino and the
assembled circuit for activating a LED, connect the NodeMCU to any
USB port of your computer. The Arduino IDE will automatically detect
the corresponding serial port where the NodeMCU is connected.
9. Go back to Arduino IDE and select the highlighted serial port as shown
below. Note that the port number could be double digit in some case.
10. There are situation where the NodeMCU is not detected by the
computer that it is connected to the USB port or the serial port is
not shown on Arduino IDE. Don't be alarmed, just reconnect the
cable to USB port or use other USB port.
THE PROGRAM
11. Upload the above code to your NodeMCU. After few seconds if all
goes well, you should see that the LED switch ON and OFF according
to the value of delay.
12. In case that the program from Sketch failed to upload to your
NodeMCU which might happen from time to time, you may need to
install on your computer a software that will flash, reset or re-install the
NodeMCU firmware for ESP8266. There are several of this software
tool available on the internet for free.
Copyright 2013 Kits and Gadgets Electronics Inc. All rights reserved.
Kits and Gadgets Electronics Inc.
Farwaniya, Kuwait 80003
Kuwait
ph: +965 99571844
kits