Arduino IDE is a open-source tool for programming microcontrollers like Arduino, NodeMCU, ESP8266, etc. Arduino IDE is available for Windows, Mac, Linux. You can download it from 👉 Software | Arduino.
Arduino IDE doesn't have NodeMCU's board support by default. So, we need to add NodeMCU's URL to Arduino IDE. To do that, follow the steps below:
File --> Preferences
.Now, we need to add the NodeMCU board to Arduino IDE. To do that, follow the steps below:
Tools --> Board: "---" --> Boards Manager
.esp8266
.Now, we need to select the NodeMCU board. To do that, follow the steps below:
Tools --> Port
and select the port that NodeMCU is connected to.Tools --> Board --> ESP8266 Boards
.NodeMCU 1.0 (ESP-12E Module)
.Like Arduino, NodeMCU also has a sketch. A sketch is a program that runs on the NodeMCU. A can be written in C or C++.
Like Arduino, sketches for NodeMCU are written in C
or C++
and are compiled to .ino
files. A sample sketch for blinking an LED is shown below. The following sample sketch will blink the built-in LED on the NodeMCU.
For built-in LED, the LED will be ON when the pin is LOW and OFF when the pin is HIGH.
To upload the sketch to NodeMCU, you need to follow the steps below.