from machine import Pin
import utime
# Define the onboard LED pin
led_pin = Pin(25, Pin.OUT)
led1 = Pin(8,Pin.OUT)
# Function to control the LED
def control_led():
led_pin.value(1) # Turn on the LED
utime.sleep(1) # Wait for 2 seconds
led1.value(1) # Turn on the LED
utime.sleep(1) # Wait for 2 seconds
led_pin.value(0) # Turn off the LED
utime.sleep(1) # Wait for 1 second
led1.value(0)
utime.sleep(1) # Wait for 1 second
# Main loop
while True:
control_led()