NodeMCU ESP8266 WiFi Module for IoT Projects 🌐

Learn how to control LEDs using NodeMCU ESP8266 12E for IoT projects with Arduino code. Easy setup and coding tips!

NodeMCU ESP8266 WiFi Module for IoT Projects 🌐
REBWAR AI
117.0K views β€’ Oct 21, 2024
NodeMCU ESP8266 WiFi Module for IoT Projects 🌐

About this video

// #arduino #code

const int led1 = 2; // GPIO2 (D4) on ESP8266
const int led2 = 4; // GPIO4 (D2) on ESP8266

void setup() {
pinMode(led1, OUTPUT); // Set LED1 pin as output
pinMode(led2, OUTPUT); // Set LED2 pin as output
}

void loop() {
digitalWrite(led1, LOW); // Turn LED1 ON
digitalWrite(led2, HIGH); // Turn LED2 OFF
delay(1000); // Wait 1 second

digitalWrite(led1, HIGH); // Turn LED1 OFF
digitalWrite(led2, LOW); // Turn LED2 ON
delay(1000); // Wait 1 second
}

Video Information

Views

117.0K

Likes

929

Duration

0:15

Published

Oct 21, 2024

User Reviews

4.3
(23)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.