def callback(line):
print("line =", line)
就用这个函数吗
https://docs.singtown.com/micropython/zh/latest/openmvcam/library/pyb.ExtInt.html
def callback(line):
print("line =", line)
extint = pyb.ExtInt(pyb.Pin("P0"), pyb.ExtInt.IRQ_FALLING, pyb.Pin.PULL_UP, callback)
while True:
pass