0% found this document useful (0 votes)
5 views2 pages

Ae 1209 Iot Lab 6

The document outlines a program for interfacing an ESP8266 Wi-Fi module with an Arduino to control a built-in LED. The provided code turns the LED on for one second and off for two seconds in a continuous loop. The result is a blinking LED pattern demonstrating the active low functionality of the ESP-01 module.

Uploaded by

ansh28405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Ae 1209 Iot Lab 6

The document outlines a program for interfacing an ESP8266 Wi-Fi module with an Arduino to control a built-in LED. The provided code turns the LED on for one second and off for two seconds in a continuous loop. The result is a blinking LED pattern demonstrating the active low functionality of the ESP-01 module.

Uploaded by

ansh28405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Ansh Sharma

AE-1209
B.Sc. Computer Science Hons

IOT
GE Electronics (VI Semester)
LAB -6

Program 8 : Interfacing ESP8266 Wi-Fi Module with Arduino

Program Code :-

void setup() {
pinMode(2, OUTPUT); // Initialize the LED BUILTIN pin as an
output
}

// the loop function runs over and over again forever


void loop() {
digitalWrite(2, LOW); // Turn the LED on (Note that LOW is the
voltage level
// but actually the LED is on; this is
because
// it is active low on the ESP-01 )
delay(1000); // Wait for a second
digitalWrite(2, HIGH); // Turn the LED off by making the voltage
HIGH
delay(2000); // Wait for two seconds (to demonstrate
the active low LED )
}

Result :-
When this code is uploaded to an ESP8266, the built-in LED will blink in the following pattern:
1. The LED will turn on for 1 second.
2. The LED will turn off for 2 seconds.
3. This on/off cycle will repeat continuously.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy