#2 leds are connected to pico pins gp0 and gp1 respectively.
# wap such that the leds will flash alternately every 0.5sec.
from machine import Pin
import utime
flash = 0.5
on = 1
off = 0
led1 = Pin(0, Pin.OUT)
led2 = Pin(1, Pin.OUT)
while True:
led1.value(on)
led2.value(off)
utime.sleep(flash)
led1.value(off)
led2.value(on)
utime.sleep(flash)