ESP 8266 – ESP-12E Hello World – Blinking LED

We are using Arduino IDE to program our ESP8266. Please see this article regarding how to setup the Arduino IDE for programming ESP8266.

Here is a blinking LED code for ESP8266 written in Arduino IDE.

#define ESP8266_LED 5 
void setup() 
{   
   pinMode(ESP8266_LED, OUTPUT); 
} 
void loop() 
{   
   digitalWrite(ESP8266_LED, HIGH);   
   delay(500);   
   digitalWrite(ESP8266_LED, LOW);   
   delay(500); 
}

Instructions:

  • Connect a LED (with a resistor in series) to an I/O pin of your ESP8266. Change the pin number to an appropriate one in the first line of the code.
  • Select the appropriate ESP Board/Version fromthe Boards Menu of the Arduino IDE. If your board is not listed then you can select Generic and then set the parameters according to the chip or module version (ESP-01, ESP-06, ESP-12E etc) you are using.
  • Upload the code to the module.
  • The LED should be blinking now.

 

2 thoughts on “ESP 8266 – ESP-12E Hello World – Blinking LED

Leave a Reply