logo

openmv的外部中断怎么写,急急急!

2022-05-23 22:27
D
l46w

def callback(line):

print("line =", line)

就用这个函数吗

2022-05-24 19:40
I
网红小智智 星瞳科技

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