Adding NodeMCU support to Arduino IDE
This guide will help you program the NodeMCU using the Arduino IDE.
Step 1: Connect Your NodeMCU to Your Computer
You need a USB micro B cable to connect the NodeMCU board to your computer. Once connected, a blue LED will start flashing.
If your computer does not detect the NodeMCU board, you may need to download the appropriate driver from the following link:
Step 2: Open Arduino IDE
Ensure you have Arduino IDE version 1.6.4 or later to proceed.
Go to File > Preferences.
In the "Additional Boards Manager URLs" field, type (or copy-paste) the following URL:
Click OK.
Now, go to Tools > Board > Board Manager.
In the search field, type "esp8266".
You should see an entry named "esp8266 by ESP8266 Community". Click on it and press the Install button on the lower right.
Once the download is complete, you're ready to start coding!
Step 3: Make an LED Blink Using NodeMCU
For our first program, we will blink an LED connected to one of the digital pins of the NodeMCU board. Note: The pin names printed on the board may differ from the pin names used in the program.
In this example, we'll connect the LED to D7, which corresponds to GPIO13. Below is the code (which is a modified version of the Arduino Blink example):
NodeMCU Pin Mapping
In this example, D7 (as printed on the board) corresponds to GPIO13 in the code.
Ensure that the LED is connected to the correct pin as per the board's pinout.
Last updated