
#设置阈值,(0,100)检测黑色线
THRESHOLD = (0, 100) # Grayscale threshold for dark things...
#设置是否使用img.binary()函数进行图像分割
BINARY_VISIBLE = True # Does binary first so you can see what the linear regression
# is being run on... might lower FPS though.
import sensor, image, time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()
while(True):
clock.tick()
img = sensor.snapshot().binary([THRESHOLD]) if BINARY_VISIBLE else sensor.snapshot()
img.invert()我运行没有问题。

什么叫做闪屏和失真?
@kidswong999 就是软件打开的屏幕会一闪一闪
我能发视频给你看嘛
@kidswong999 ?
可能是硬件的问题,你联系卖家修一下。