In this tutorial we will see how to setup your NodeMCU ESP8266 for first time in Arduino IDE & Blink LED. It is simple if you follow each and every steps carefully.

For doing this project you will need,

  1. NodeMCU ESP8266 12E,
  2. 220 ohms Resistor,
  3. LED,
  4. Breadboard,
  5. Jumper Wire.
Setting Up ESP8266 for Arduino IDE:
Step 1:

Open Arduino IDE, If you haven’t installed it yet, You can download and install it.

Step 2:

Now you need to install ESP8266 add on in Arduino IDE, for this go to TOOLS > Preferences

Step 3:

http://arduino.esp8266.com/package_esp8266com_index.json paste this line to “Additional Board Manager URLs” then click OK.

Preference changes for ESP8266

Step 4:

Go to Tools > Board > Boards Manager

Step 5:

Type “ESP8266” in search bar, You will see ESP8266 by ESP8266 community. Click on Install. I have already installed it. you can see it is showing “INSTALLED”.install ESP8266 board manager

You have successfully installed ESP8266 board in Arduino IDE.

Step 6:

Go to tools > Board > select Generic ESP8266 Module

select generic ESP8266 module

Select correct port.

Select port

Restart the Arduino IDE. Now you are ready work with NodeMCU ESP8266 using Arduino IDE.

Blink LED with NodeMCU ESP8266:

Connect ESP8266 and LED like this.

Blink LED with ESP8266 NodeMCU 12E

Open Arduino IDE, Go to File > Examples > ESP8266 > Blink

void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is active low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}

Upload the Sketch.

Now you will be able to see Blinking LED with ESP8266. You can see LED is ON for 2 second and OFF for 1 Second.

Next tutorial we will see how to control LED from ESP8266 web server.

Till Then Keep Learning Keep Making.