from machine import Pin
import time
# Initialize an onboard LED (GPIO2 is often used on ESP32)
led = Pin(2, Pin.OUT)
while True:
led.value(1) # Turn on the LED
time.sleep(1) # Wait for 1 second
led.value(0) # Turn off the LED
time.sleep(1) # Wait for 1 second