MaixPy-v1
MaixPy-v1 copied to clipboard
启动摄像机模块后就无法启动新线程
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启动新线程无效