from machine import Pin
from time import sleep_ms

led01 = Pin(18, Pin.OUT)
led02 = Pin(19, Pin.OUT)
led03 = Pin(21, Pin.OUT)
led04 = Pin(22, Pin.OUT)
led01.off()
led02.off()
led03.off()
led04.off()
while True:
  sleep(0.5)
  led01.value(not led01.value())
  led02.value(not led02.value())
  led03.value(not led03.value())
  led04.value(not led04.value())
from machine import Pin
from time import sleep_ms

led01 = Pin(16, Pin.OUT);led02=Pin(17,Pin.OUT);led03=Pin(18,Pin.OUT);
led04 = Pin(19, Pin.OUT)
t_ms=[1000,500,250,100,50]
cnt=i=0

while True:
  led01.on();led02.on();led03.on();led04.on()
  sleep_ms(t_ms[i])
  led01.off();led02.off();led03.off();led04.off()
  sleep_ms(t_ms[i])
  print(cnt,end=*,*)
  cnt=cnt+1
  if cnt==5:
    cnt=0
    print(">",i)
    print(*---------*)
    i+=1
    if i>4:
      i=0