from machine import Pin
import time
led = Pin(22, Pin.OUT)
btn1 = Pin(21, Pin.IN, Pin.PULL_UP)
btn2 = Pin(18, Pin.IN, Pin.PULL_UP)
cont = 0
while True:
led.value(0)
if btn1.value() == 0:
if btn1.value() == 0:
print (cont)
cont = cont + 1
if cont == 2:
led.value(1)
time.sleep(0.1)