Skip to content

vishal-ravi/Setup-Arduino-IDE

Repository files navigation

Arduino IDE Setup for NODEMCU ESP8266

This repository provides a guide on setting up the Arduino IDE for NODEMCU ESP8266 development. Follow the steps below to get started:

Step 1: Installing Arduino IDE Software

Download and install the Arduino IDE software from Arduino's official website.

image

Step 2: Arduino IDE Icon

After installing Arduino IDE, an icon will be created on your desktop. Use this icon to open the Arduino IDE.

Step 3: Opening Arduino IDE

Click on the Arduino IDE icon to open the Arduino window.

image

Step 4: Preferences

Open the "File" menu and click on "Preferences" as shown in the figure.

image

Step 5: Adding ESP8266 Board Manager

image

In the "Additional Boards Manager URLs" field, enter the following URL:

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

Click "OK" to save.

Step 6: Selecting Board

image

Open the "Tools" menu, go to "Board," and select "Arduino/Genuino Uno." Then, click on "Boards Manager" as shown in the figure.

Step 7: ESP8266 Board Package

image

In the Boards Manager window, scroll to the bottom until you find the module with the name "ESP8266." Select the module, choose the version, and click "Install." Once installed, it will display "Installed," and you can close the window.

Step 8: Selecting ESP8266 Arduino Board

image

To use ESP8266 with Arduino, select the Board: "Arduino/Genuino Uno" and change it to "NodeMCU 1.0 (ESP-12E Module)" or other ESP8266 modules based on your hardware. Scroll down to find the appropriate option.

Step 9: Connecting ESP8266 to the PC

Connect the ESP8266 module to your computer using a USB cable. When the module is connected, a COM port will be detected (e.g., COM5), as shown in the figure.

Step 10: Test the below Program in Arduino IDE

// Test code
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

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

Step 11: Selecting COM Port

image

Click on "Tools" and select the port under "Port" based on the ESP8266 module connected to your computer. Refer to the previous steps for selecting the COM port.

Step 12: Uploading the Program to ESP8266 Module

image

  1. In the Blink example code, change all instances of the pin number "13" to "16."
void setup() {
  // initialize digital pin 16 as an output.
  pinMode(16, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  delay(10);
  digitalWrite(16, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(16, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}
  1. Click on the right arrow button (upload button) as shown in the figure to upload the program to the module.

This will start the blinking LED on the onboard LED of the NODEMCU module connected to pin D0 (GPIO16). You have successfully uploaded and run a basic program on your NODEMCU ESP8266 module using the Arduino IDE.

Feel free to explore and modify the code for more complex projects!

Now you're ready to start programming your NODEMCU ESP8266 using the Arduino IDE. Happy coding!

About

Steps to Setup Arduino IDE for NODEMCU ESP8266

Resources

Stars

Watchers

Forks

Packages

No packages published