系统迁移中,暂时无法访问,所有数据会迁移到新的网站。
OpenMV VSCode 扩展发布了,在插件市场直接搜索OpenMV就可以安装
如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修。
发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
每一个新的提问,单独发一个新帖子
帖子需要目的,你要做什么?
如果涉及代码,需要报错提示与全部代码文本,请注意不要贴代码图片
必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
使用定时器如何实现隔一段时间与Arduino通信的功能?程序提示memory error的原因?
-
def set_outstr(timer): out_str ='[' out_str +='(%d,%d)' %(x_error,y_error) out_str +=']' uart.write(out_str) #向arduino传递out_str字符串 print (out_str) while(True): clock.tick() # Track elapsed milliseconds between snapshots(). img = sensor.snapshot() # Take a picture and return the image. blobs = img.find_blobs([green_threshold]) tim=Timer(4,freq=5) if blobs: max_blob = find_max(blobs) x_error = max_blob[5]-img.width()/2 #X方向偏差 y_error = max_blob[6]-img.height()/2 #y方向偏差 print("x error: ", x_error) print("y_error: ", y_error) img.draw_rectangle(max_blob[0:4]) # rect img.draw_cross(max_blob[5], max_blob[6]) # cx, cy tim.callback(set_outstr)
提示错误:uncaught exception in Timer(4) interrupt handler
MemoryError:
x error: -119.0
y_error: -21.0
-
你的代码不全,无法运行。