MaixPy-v1 icon indicating copy to clipboard operation
MaixPy-v1 copied to clipboard

启动摄像机模块后就无法启动新线程

Open vycz opened this issue 4 years ago • 0 comments

import _thread
import time
import sensor, lcd

def func(name):
    while 1:
        print("hello {}".format(name))
        time.sleep(1)
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.run(1)
sensor.skip_frames()
_thread.start_new_thread(func,("1",))
lcd.init(freq=15000000)

while(True):
    lcd.display(sensor.snapshot())

在sensor run后使用_thread.start_new_thread启动新线程无效

vycz avatar Dec 06 '20 14:12 vycz