Pages

Friday, 11 January 2019

ESP32- BLINKING AN LED

ESP32- BLINKING AN LED


Aim:
 Turn ON and OFF an LED after Particular delay
Objective:
To learn how to connect LED to digital pins of an ESP32 Microcontroller and program to blink an LED
Connections:
Pin Mapping:

LED
I04
Program:
void setup() {
pinMode(4, OUTPUT);//Initialize the output pin
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(4, HIGH);// Turn the LED on
 delay(1000);   // Wait for a second.

digitalWrite(4, LOW);  // Turn OFF LED
delay(1000); // Wait for a second.
}

No comments:

Post a Comment