How to set up Arduino IDE for the Nodemcu board
Hello guys, Welcome back to my SriTu Hobby blog. Today we are going to learn the first Nodemcu lesson. This lesson mainly focuses on how to set up Arduino IDE for the Nodemcu board and how to blink an LED bulb using the Nodemcu board.
What is the Nodemcu board?
Nodemcu board is a development board. It is an open-source platform. But this board is different from the other boards. Because it has WIFI technology. We can use this board for IoT technology. IoT technology is known as the Internet of Things. The Internet of Things is the control of all electronic devices in the home through the Internet. This could also be called the next revolution in technology.
Okay, let’s talk about this board structure. The ESP-12E module is used to create this board. Also, this board includes an ESP8266 chip. This chip consists of a microprocessor called a Tensilica Xtensa 32-bit LX106 RISC. It can be changed in the frequency range of 80MHz – 160MHz. Also, this board includes 4MB of memory. we can see different types of Nodemcu boards in the market. But, most commonly, the following two types are used.
The pin diagrams on both of these boards are similar. But there are two main differences between these boards. The first one is the USB interface. The board in the first picture includes a CP2102 USB drive chip. It does not require drivers to connect to the computer. The board in the second picture includes a CH340 USB drive chip. For this, you must have CH340 / 341 drivers installed on your computer. The second difference is the size of these boards. The board in the first picture, we can easily attach to the breadboard and the second board is difficult to attach to the breadboard. So, now we look at the other features of these Nodemcu boards.
Features
- Wireless 802.11 b / g / n standards;
- Support STA / AP / STA + AP three operating modes;
- Built-in TCP / IP protocol stack to support multiple TCP Client connections (5 MAX);
- D0 ~ D8, SD1 ~ SD3: used as GPIO, PWM, IIC, etc. Port Drive 15mA;
- AD0: 1 channel ADC;
- Power input: 4.5V ~ 9V (10VMAX), USB-powered, providing USB debugging interface;
- Current job: keep sending: ≈70mA (200mA MAX), Standby:
- Transfer rate: 110-460800bps;
- Support UART / GPIO data communication interface;
- Remote firmware upgrade (OTA);
- Smart Link supports intelligent networking capabilities;
- Operating temperature: -40 ℃ ~ + 125 ℃;
- Drive Type: Dual high-power H-bridge driver
- Module Weight: about 7g
- Board Name: NodeMCU 1.0 (ESP-12E Module)
- USB-to-UART bridge chip: CP2102
Let us now look at the Nodemcu Pin diagram.
These Nodemcu boards include 9 digital pins and 1 analog pin. This is the same for all Nodemcu boards. So, we have now explained a lot of information about these Nodemcu boards. Next, we set up the Arduino IDE for the Nodemcu program.
Ok, let’s do it step by step.
Step 1
Open your Arduino IDE.
Step 2
After, follow the steps below. First, click File –> Preferences and include Additional Board Manager URLs. For that, use this link.
- http://arduino.esp8266.com/stable/package_esp8266com_index.json
Step 3
Next, click Tools -> Board Manager. After, Search Nodemcu and install its latest version.
Right now the Arduino IDE setup is complete. Now you can use the Nodemcu board through the Arduino IDE.
OK, we try to blink an LED bulb using the Nodemcu board. The components required for this are as follows. You can easily purchase these components using the links provided.
Components
- Nodemcu board x 1 — Our Store / Amazon
- LED bulb x 1 — Our Store / Amazon
- 180-ohm Resistor x 1 — Our Store / Amazon
- Jumper wires. — Our Store / Amazon
- Breadboard x 1. — Our Store / Amazon
Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.
Step 1
Let’s identify these components.
Step 2
Next, connect these components using the below circuit diagram.
Step 3
Then, connect this circuit to the computer using a USB cable. Now let’s look at the code. For that, I’m using a simple LED bulb blink code.
void setup() {
pinMode(D0, OUTPUT);
}
void loop() {
digitalWrite(D0, HIGH);
delay(1000);
digitalWrite(D0, LOW);
delay(1000);
}
Step 4
Now, select the correct board and port. After, click the upload button.
The full video guide is given below. Please watch it. We will meet in the next post. Have a good day. Bye-bye.
How to set up Arduino IDE for the Nodemcu board