from machine import Pin
import time
led=Pin(4,Pin.OUT)
btn1=Pin(14,Pin.IN,Pin.PULL_DOWN) #pulsante PULL-DOWN
btn2=Pin(27,Pin.IN, Pin.PULL_UP) #pulsante PULL-UP
led.off()
def accendiLed(bt1):
led.on()
def spegniLed(bt2):
led.off()
btn1.irq(handler=accendiLed, trigger=Pin.IRQ_FALLING)
btn2.irq(handler=spegniLed, trigger=Pin.IRQ_RISING)