from machine import Pin
from utime import sleep
sw=[Pin(27,Pin.IN),Pin(14,Pin.IN),Pin(12,Pin.IN)]
led=[Pin(15,Pin.OUT),Pin(2,Pin.OUT),Pin(4,Pin.OUT)]
print("TEST")
while True:
if sw[0].value() == 0 :
for i in range(2):
for q in range(i+1):
led[0].value(1)
sleep(1)
led[0].value(0)
sleep(1)
if sw[1].value() == 0 :
for i in range(2):
for q in range(i+1):
led[1].value(1)
sleep(1)
led[1].value(0)
sleep(1)
if sw[2].value() == 0 :
for i in range(2):
for q in range(i+1):
led[2].value(1)
sleep(1)
led[2].value(0)
sleep(1)
#or a in range(i+1):
# led[a].value(1)
# sleep(1)
# for a in range(i+1):
#led[a].value(0)
# sleep(1)