Up and Running with NodeMCU IoT Development Board

Up and Running with NodeMCU IoT Development Board

NodeMCU is a famous Devlopment board for creating, playing and tinkering with Electronics projects. It is also powerful tool to develop various Internet of things (IoT) projects due to its small size and on-board 802.11 WiFi Chip known as ESP8266. This article supposes that you already have the basic Know-How of working with Arduino/Genuino board. In the content which follows, we will cover the Basics of writing code to NodeMCU using the Arduino IDE.

Basically NodeMCU runs as a firmware that utilizes the power of ESP8266 WiFi Chip and assembled in a black-colored PCB with Arduino-like programmable Analog (A0) and Digital (D0 – D8) pins as shown in the figure below.

nodemcu in pakistan esp8266 buy online iot projects
Image Source: ElectronicWings

NOdeMCU also supports serial communication protocols such as I2C, SPI and UART etc. which makes it flexible to use with components like i2c LCD, MPU-6050 Gyro meter + Accelerometer , SD cards, touch displays and GPS modules.

You can judge, how powerful and useful this tiny board is by looking at the Project aimed to Create a Weather Station with NodeMCU.

Getting Started with NodeMCU

In order to get started, you first need a NodeMCU board and a few sensors or other electrical components to start experimenting. If you are interested in buying a packaged NodeMCU kit, don’t forget to look at our IoT NodeMCU Starter Kit including all the necessary components required to jump start with IoT and Electronics.

If you, somehow want individual components or need to buy with your own choice, you can purchase individual components and IoT parts from our sister site or97.com.

got the Hardware? Let’s get started.

1. First of all, you need an IDE to upload/write programs to NodeMCU. By default, NodeMCU can be programmed by writing and uploading LUA scripts, but for the sake of simplicity and ease, we will use Arduino official IDE to program our board. You can download Arduino IDE from Arduino Download page , if you don’t have it already.

Arduino nodemcu ide download nodemcu projects iot pakistan
Arduino IDE

You can download either the zip file or windows installer, as you wish. Windows installer file is recommended, however.

2. After installing, open Arduino IDE, and add the following link in File > Preferences > Additional Boards Manager URL

3. Now, close the Preferences Window and browse to Tools> Board > Boards Manager . We need to install the NodeMCU board in order to enable Arduino IDE to upload code to board.

4. In the Boards Manager Window, Search for Esp8266 and install the board listed as ESP8266 by Esp8266 community and install the latest version.

5. After installation of the board, Open Tools > Board and verify that all esp8266 compatible boards are installed. Select NodeMCU 1.0 as the board for which we are going to write programs. Don’t worry if you don’t know your nodemcu version, 1.0 will work for all.

Testing an Example Code

1. Let’s test if our board is ready to accept instructions using Arduino IDE. Connect the board to laptop or computer with the help of a USB cable as shown below.

nodemcu iot in pakistan arduino iot projects

2. Write the following code:

void setup() 
Serial.begin(9600);  /* initialise serial communication */

void loop()
Serial.println("Love from ioTechy.com"); /* print iotechy.com at new line per second */

3. Make sure that you have selected the correct board and COM port before uploading.

nodemcu error nodemcu tutorials

4. Compiler and Upload the code directly to NodeMCU by clicking on Upload button. You can see the upload progress bar below the code window.

5. Open Serial Monitor from Upper left corner to check the output we have specified in our Serial.println() function. You may need to set the baud rate as 9600 in the Serial Monitor window as shown below.

You are good to go! 🙂 If you got any problems, don’t forget to comment or mail us at [email protected].

This Post Has One Comment

Comments are closed.