print("Hello, ESP32!")
from machine import Pin
import time
# Define the GPIO pin to which the LED is connected
led_pin = 2 # GPIO pin number, adjust as needed
# Initialize the LED pin as an output
led = Pin(led_pin, Pin.OUT)
# Main loop
while True:
# Turn the LED on
led.value(1)
print("LED ON")
time.sleep(1) # Wait for 1 second
# Turn the LED off
led.value(0)
print("LED OFF")
time.sleep(1) # Wait for 1 second