
改成灰度也一样报错。前几分钟还连接成功,没有报错,但是刚刚就突然报错了,是什么问题呢?怎么解决呢?
附上代码:
import sensor, image, time
from pyb import RTC, Pin, Timer
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA) # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000) # Wait for settings take effect.
#定时
def tick(timer): # we will receive the timer object when being called
print("Timer callback")
tim = Timer(4, freq=0.1) # create a timer object using timer 4 - trigger at 1Hz
tim.callback(tick) # set the callback to our tick function
#时钟
#rtc = RTC()
#rtc.datetime()#(2018, 5, 11, 5, 9, 22, 0, 0)
while(True):
img = sensor.snapshot()
# print(rtc.datetime())
time.sleep(1000)发现其他代码也报错

我用的最新版本固件(2.9.0)和ide(1.9.0)运行没有问题。
你升级到最新版固件和ide试一下。
你是OpenMV2还是OpenMV3?
ide是1.8.1的,正在下1.9.0
windows系统的是下这个吧

如果是OpenMV3就点文件夹OpenMV3是吗?

固件可以直接在IDE里面点一下升级,教程里都有
升级了固件,可以正常使用了
@kidswong999 我也有这个问题,不过更新了好几次固件都没反应,还有其他办法吗?
应该是中断冲突了,你运行hello world 应该是没问题的吧

你要硬件重启(也就是重新拔数据线),然后直接运行hello world
@kidswong999 这样可以运行hello world了。找到我程序的问题了,谢谢大佬~