กลับหน้าหลัก
views
Installing NodeMCU ESP8266 on Arduino IDE
Last updated on

Installing NodeMCU ESP8266 on Arduino IDE


Installing NodeMCU ESP8266 on Arduino IDE

This guide walks you through installing the NodeMCU ESP8266 board on Arduino IDE from scratch, so you can start programming the board.

Diagram showing NodeMCU ESP8266 v2 board with labeled D0 pin and Micro USB port

Required Equipment

  • NodeMCU ESP8266 V2 or V3 board
  • Micro USB to USB Type-A cable
  • Computer with Arduino IDE installed

Step 1: Download and Install Arduino IDE

Go to arduino.cc and download the IDE version for your operating system. Click JUST DOWNLOAD to download without donating.

After downloading, run the installer and follow the prompts to complete the installation.

Step 2: Add ESP8266 Board URL

Open Arduino IDE and go to File → Preferences.

Screenshot of Arduino IDE Preferences window showing the Additional Boards Manager URLs field

In the Additional Boards Manager URLs field, paste this URL:

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Click OK to save.

Step 3: Install ESP8266 Board via Board Manager

Go to Tools → Board → Board Manager.

Screenshot of Board Manager window with ESP8266 in the search field

Type ESP8266 in the search box. You will find the esp8266com package. Click Install.

Wait for the installation to complete.

Step 4: Connect NodeMCU to Your Computer

Plug the Micro USB cable from the NodeMCU board into your computer.

Open Device Manager (on Windows, right-click This PC → Properties → Device Manager) and look under Ports (COM & LPT).

If your computer detects the board, you will see the COM port listed, for example COM4.

If the COM Port Is Not Detected (Install the Driver)

NodeMCU v2 uses the CP2102 chip. Download the driver from Silicon Labs website.

NodeMCU v3 uses the CH340 chip. Download the driver from the manufacturer’s website.

After installing the driver, unplug the USB cable and plug it back in. Check Device Manager again.

Step 5: Configure Board and Port in Arduino IDE

Go to the Tools menu and set the following:

  • Board: Select NodeMCU 1.0 (ESP-12E Module) or the option that matches your board
  • Port: Select the COM port where your board is connected, for example COM4

[image: Arduino IDE Tools menu showing NodeMCU board selected and COM4 port selected]

Write or copy the following code into Arduino IDE:

#define LED D0 // NodeMCU v2 uses D0, NodeMCU v3 uses D4

void setup() {
    pinMode(LED, OUTPUT);
}

void loop() {
    digitalWrite(LED, HIGH);
    delay(250);
    digitalWrite(LED, LOW);
    delay(250);
}

Important note: If you are using NodeMCU v3, change #define LED D0 to #define LED D4.

Click the Upload button (right arrow icon) to upload the code.

Wait until you see “Done uploading” and the progress bar reaches 100%.

[image: Arduino IDE showing successful upload message with NodeMCU LED blinking on the board]

Summary

  1. Download and install Arduino IDE
  2. Add the ESP8266 board package URL in Preferences
  3. Install ESP8266 board via Board Manager
  4. Connect the board and verify the COM Port
  5. Configure Board and Port settings correctly
  6. Upload the test code

If you followed all steps correctly, the LED on the board will blink every 500 milliseconds, confirming the board is ready to use.

อยากทำโปรเจคแบบนี้?

รับทำโปรเจค Arduino / IoT จบงานไว ส่งงานครบ พร้อมสอน

If you need Arduino project service or urgent IoT development, see full service details on the services page

จ้างทำโปรเจคเลย

Project estimate

Want something like this? Open the estimate page.

The long form is now on a separate estimate page, so this article stays clean.

ความคิดเห็น

รีวิวจากคนใช้งานจริง

รีวิวจากลูกค้าและคนที่เคยใช้งาน

ถ้าเคยสั่งงาน เคยอ่านหน้านี้แล้วได้ประโยชน์ หรือมีข้อเสนอแนะ ฝากรีวิวไว้ได้เลย

กำลังโหลดรีวิว...