# pin_irq.py

from machine import Pin
from time import sleep

def handleMyPinInterrupt(myPin):
    print(myPin, 'wurde betätigt.')
    
taster0 = Pin(0, Pin.IN, Pin.PULL_UP)
taster0.irq(trigger=Pin.IRQ_FALLING, handler=handleMyPinInterrupt)

taster1 = Pin(35, Pin.IN) # ext. Pull-Upp-Widerstand auf Platine; taster1 prellt sehr stark beim Loslassen
taster1.irq(trigger=Pin.IRQ_FALLING, handler=handleMyPinInterrupt)

led = Pin(27, Pin.OUT)
while True:
    led.value(1)
    sleep(0.2)
    led.value(0)
    sleep(0.2)    