I
这样还是不行呀
from pyb import Pin, ExtInt
import sensor, image, time,pyb,micropython
micropython.alloc_emergency_exception_buf(100)
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()
def callback(line):
global ExtInt
ExtInt.disable()
print("line =", line)
ExtInt.enable()
extint = pyb.ExtInt(Pin('P0'), pyb.ExtInt.IRQ_FALLING, pyb.Pin.PULL_UP, callback)
while(True):
clock.tick()
img = sensor.snapshot()