Using NodeMCU with Arduino IDE

In this blog we will see how to use NodeMCU with Arduino IDE. Once you are done with the setup you will be run arduino sketches on NodeMCU. First we need to setup the IDE.

we need to add the NodeMCU to board manager.

Goto File->Preferences and paste the following URL in additional board manager URL


Then goto Tools->Board->Board Manger


You should entry for ESP


Click on esp8266 entry , you will get option to install it. Once the installation is completed , you will have new boards in the board selection menu.


Now we can run the blinking LED program on NodeMCU.

void setup() {
 // initialize digital pin 13 as an output.
 pinMode(0, OUTPUT);
 Serial.println("App started");

// the loop function runs over and over again forever
void loop() {
 digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level)
 delay(1000); // wait for a second
 digitalWrite(0, LOW); // turn the LED off by making the voltage LOW
 delay(1000); // wait for a second


In case of NodeMCU , the pin numbers does not match with the pin numbers on NodeMCU. Here is the mapping between Arduino code and NodeMCU

NodeMCU to Arduino Pin Mapping
NodeMCU to Arduino program – Pin Mapping


One Comment

Add a Comment

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