Installing ESP8266 Board in Arduino IDE (In any operating system.)

Description: In this project we are installing ESP8266 Board.The ESP8266 community created an add-on for the Arduino IDE that allows you to program the ESP8266 using the Arduino IDE and its programming language.This website shows how to install the ESP8266 board in Arduino IDE whether you’re using Windows, Mac OS X ,Linux or any other operating system.

Component:

  • ESP8266 – (NodeMcu-8266).
  • LED.
  • Jumper wires.
  • Breadboard.
  • 330 Ohm resistor.

// video

Step 1: Arduino IDE Installed

Before starting this installation procedure, make sure you have the latest version of the Arduino IDE installed in your computer. If you don’t, uninstall it and install it again. Otherwise, it may not work.

Having the latest Arduino IDE software installed from arduino.cc/en/Main/Software, continue with this tutorial.

Step 2: Install ESP8266 Add-on in Arduino IDE

To install the ESP8266 board in your Arduino IDE, follow these next instructions:

1.In your Arduino IDE, go to FilePreferences.

2.Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into the “Additional Boards Manager URLs” field as shown in the figure below. Then, click the “OK” button:

3.Open the Boards Manager. Go to Tools > Board > Boards Manager… 

4.Search for ESP8266 and press install button for the “ESP8266 by ESP8266 Community“:

Step 3:Testing the Installation.

To test the ESP8266 add-on installation, let’s see if we can blink an LED with the ESP8266 using the Arduino programming language.

Parts Required

  • ESP8266 – (NodeMcu-8266).
  • LED.
  • Jumper wires.
  • Breadboard.
  • 330 Ohm resistor.

Step 4:Uploading the Sketch

Uploading the Sketch to the ESP-01 or Nodemcu 8266.

Uploading code to the ESP-01 requires establishing a serial communication between your ESP8266 and a FTDI Programmer as shown in the schematic diagram below.

If you’re using an ESP-01 NodeMCU Kit, uploading the sketch is very simple, since it has built-in programmer. Plug your board to your computer. Make sure you have the right board selected:

The following table shows the connections you need to make between the ESP8266 and the FTDI programmer.

ESP8266FTDI programmer
RXTX
TXRX
CH_PD3.3V
GPIO 0GND
VCC3.3V
GNDGND

Uploading the Sketch to the Nodemcu 8266.

Connect an LED to your ESP8266, as shown in the following schematic diagram. The LED should be connected to GPIO 2 (D4).

If you’re using an ESP8266-01

If you’re using the ESP8266-01 assemble the following circuit.

If everything went well, your LED of Esp-01 should be blinking every 1 second.

You also need to select correct Port:

Then, copy the code provided:

/*********
  Welcome to Gnd_To_Vcc!!
  
*********/

int pin = 2;

void setup() {
  // initialize GPIO 2 as an output.
  pinMode(pin, OUTPUT);
}

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

Click the “Upload” button in the Arduino IDE and wait a few seconds until you see the message “Done uploading.” in the bottom left corner.

Troubleshooting

If you try to upload a new sketch to your ESP8266 and you get this error message “esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header“. It means that your ESP8266 is not in flashing/uploading mode.

Having the right board name and COM port selected, follow these steps:

  • Hold-down the “BOOT/FLASH” button in your ESP8266 development board
  • Press the “Upload” button in the Arduino IDE to upload your sketch:
  • When you see the  “Connecting….” message in your Arduino IDE, release the finger from the “BOOT/FLASH” button
  • After that, you should see the “Done uploading” message

Your ESP8266 should have the new sketch running. Press the “ENABLE/RESET” button to restart the ESP8266 and run the new uploaded sketch.

Published by Gnd_To_Vcc

Here to spread my knowledge . Knowledge should always be spread not stored.

19 thoughts on “Installing ESP8266 Board in Arduino IDE (In any operating system.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: