There was an error while loading. Please reload this page.
Button Switchを押すと、print(“intr”)が実行されます。
RA4M1 Clickerの例:P304を指定します。
from pyb import Pin,ExtInt callback = lambda e: print("intr") ext = ExtInt(Pin(Pin.cpu.P304, Pin.IN, Pin.PULL_UP), ExtInt.IRQ_RISING, Pin.PULL_UP, callback)
from pyb import Pin,ExtInt callback = lambda e: print("intr") ext = ExtInt(Pin(Pin.cpu.P105, Pin.IN, Pin.PULL_UP), ExtInt.IRQ_RISING, Pin.PULL_UP, callback)
Home