请问为什么 pyb.stop() 函数会造成 openMV 和 PC 断开连接? 无论在mac上还是Windows上都如此。代码是:
import sensor, image, time, pyb
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
rtc = pyb.RTC()
rtc.datetime((2014, 5, 1, 4, 13, 0, 0, 0))
print(rtc.datetime())
clock = time.clock()
print(clock)
g = pyb.Pin(pyb.Pin.board.P0, pyb.Pin.IN)
h = pyb.Pin('P6', pyb.Pin.OUT_PP)
print(clock.fps())
pyb.stop()
while(True):
clock.tick()
img = sensor.snapshot()
pyb.stop()
RTC.wakeup(10000, callback=8)
谢谢了!