fbpx

ESP8266 – Blink led

Blinking led is a first step to begin any microcontroller.Esp8266 12e have built-in led, Led is internally mapped to GPIO 2.

Code

void setup()
{
pinMode(2, OUTPUT); /* CONFIG GPIO 2 AS OUTPUT */
}
void loop()
{
digitalWrite(2, LOW); /* Turn the LED on */
delay(1000); /* Wait for a second */
digitalWrite(2, HIGH); /* Turn the LED off */
delay(1000); /* Wait for a second */
}

 

1 comment on “ESP8266 – Blink led

Leave a Reply

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