blink led on esp8266

Solutions on MaxInterview for blink led on esp8266 by the best coders in the world

showing results for - "blink led on esp8266"
Ilaria
18 Feb 2017
1int LED = 5; // Assign LED pin i.e: D1 on NodeMCU
2
3void setup() {
4
5// initialize GPIO 5 as an output
6
7pinMode(LED, OUTPUT);
8
9}
10
11// the loop function runs over and over again forever
12
13void loop() {
14
15digitalWrite(LED, HIGH); // turn the LED on
16delay(1000); // wait for a second
17digitalWrite(LED, LOW); // turn the LED off
18delay(1000); // wait for a second
19
20}