Open
Description
Is there a way to get the physical address of a pin class? For example a IRQ pin handler, determine which pin has tripped?
from machine import Pin
def handle(p):
print(int(str(p)[4:-1])) # Better way to get pin number 5?
pin = Pin(5, Pin.IN, Pin.PULL_UP)
pin.irq(trigger=Pin.IRQ_FALLING, handler=handle)