Skip to content
Home » IoT » NodeMCU with Arduino IDE: Setup

NodeMCU with Arduino IDE: Setup

Arduino IDE logo alongside NodeMCU ESP8266 development board showing the WiFi module, CP2102 USB chip, and GPIO pin labels for setting up NodeMCU with Arduino IDE
Embedded Systems Learning Path
Part 71 of 129 — View Full Path →

KEY TAKEAWAYS

  • The Arduino IDE can program ESP8266/NodeMCU boards after adding the ESP8266 board manager URL
  • Install the ESP8266 board package from the Boards Manager to get board definitions and libraries
  • Select the correct board (NodeMCU 1.0) and port before uploading sketches
  • Most Arduino libraries work with ESP8266, plus it adds WiFi and web server capabilities

NodeMCU is Lua based firmware of ESP8266. Generally, ESPlorer IDE is referred for writing Lua scripts for NodeMCU. It requires to get familiar with ESPlorer IDE and Lua scripting language. There is another way of developing NodeMCU with a well-known IDE i.e. Arduino IDE. We can also develop NodeMCU applications using Arduino development environment. This makes things easy for Arduino developers than learning new language and IDE for NodeMCU.

Let’s see about setting up NodeMCU with Arduino IDE . This is the first part of a tutorial series on NodeMCU. In this post I’ll show you how to install the NodeMCU and ESP boards.

Prerequisites: Install Arduino IDE

First Download Arduino IDE (version 1.6+) from the below link and install it 

https://www.arduino.cc/en/Main/Software

Now that Arduino is installed, let’s move on to install the ESP boards manager.Install ESP boards in Arduino


NodeMCU is based on the ESP8266 WiFi module. Hence, to program NodeMCU in the Arduino IDE, we need to install the ESP board manager.

  • Open Arduino IDE
  • Go to File -> Preferences
Arduino IDE version 1.6.13 File menu with the Preferences option highlighted, the first step in configuring Arduino IDE for NodeMCU ESP8266 development
  • Now on Preference window, Enter below link in Additional Boards Manager URLs:

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

Arduino IDE Preferences dialog showing the Additional Boards Manager URLs field highlighted with the ESP8266 board package URL http://arduino.esp8266.com/stable/package_esp8266com_index.json entered to enable NodeMCU support
  • Now close Preference window and go to Tools -> Board -> Boards Manager
Arduino IDE Tools menu expanded showing Board selection set to Arduino Nano with Boards Manager option highlighted, navigating to install ESP8266 board support for NodeMCU development
  • In Boards Manager window, type “esp” in the search box, esp8266 will be listed there below. Now select latest version of board and click on install.
Arduino IDE Boards Manager window with esp typed in the search filter showing the esp8266 by ESP8266 Community board package with version 2.5.0 selected and Install button highlighted, ready to add NodeMCU board support
Arduino IDE Boards Manager showing the ESP8266 board package installation in progress with a blue progress bar downloading tools 2 of 3 at 23694kb of 44935kb total
  • Once installation is complete, you can see the “Installed” as shown below:
Arduino IDE Boards Manager showing esp8266 by ESP8266 Community version 2.5.0 successfully installed, confirming NodeMCU board support is ready for ESP8266 development

It’s now time to test the board.Testing the NodeMCU installation

  • Create a new sketch in Arduino and select the NodeMCU 1.0 board from boards as shown below
  • program nodemcu with arduino
  • Connect the NodeMCU to the USB port via a USB CableSelect the COM port

  • Arduino IDE Tools menu showing board set to NodeMCU 1.0 ESP-12E Module with COM5 port selected, demonstrating the correct configuration for programming NodeMCU



    • Click on Upload

    If the program uploads successfully, it means that the NodeMCU is installed properly. The program won’t do anything as we have not written any instructions. We are just checking the installation.


    Once installed successfully, you might be interested in learning and trying out few NodeMCU projectsHow to Connect NodeMCU to AWS IoT Core – NerdyElectronicshttps://nerdyelectronics.com/esp8266-spiffs-file-system/ 


     

    Leave a Reply

    Your email address will not be published. Required fields are marked *