// Blinking LED with ESP32
// Define the pin connected to the LED
const int ledPin = 2;
void setup() {
// Set the LED pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(ledPin, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off
digitalWrite(ledPin, LOW);
// Wait for another second
delay(1000);
}