• OpenMV VSCode 扩展发布了,在插件市场直接搜索OpenMV就可以安装
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 串口通信



    • 我想将openmv的数据传输到串口助手上,参照教程,发送 hello world串口助手可以收到,但发送复杂的数据就都没有反应,这是为什么?



    • 需要贴出来代码,才能知道



    • # Blob Detection and uart transport
      import sensor, image, time
      from pyb import UART
      import json
      # For color tracking to work really well you should ideally be in a very, very,
      # very, controlled enviroment where the lighting is constant...
      yellow_threshold   = (65, 100, -10, 6, 24, 51)
      # You may need to tweak the above settings for tracking green things...
      # Select an area in the Framebuffer to copy the color settings.
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.RGB565) # use RGB565.
      sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed.
      sensor.skip_frames(10) # Let new settings take affect.
      sensor.set_auto_whitebal(False) # turn this off.
      clock = time.clock() # Tracks FPS.
      
      uart = UART(3, 115200)
      
      while(True):
          img = sensor.snapshot() # Take a picture and return the image.
      
          blobs = img.find_blobs([yellow_threshold])
          if blobs:
              print('sum :', len(blobs))
              output_str = json.dumps(blobs)
              for b in blobs:
                  # Draw a rect around the blob.
                  img.draw_rectangle(b.rect()) # rect
                  img.draw_cross(b.cx(), b.cy()) # cx, cy
      
              print('you send:',output_str)
              uart.write(output_str+'\n')
          else:
              print('not found!')
      

      这个代码不能够显示



    • 烧进去之后,摄像头就不往回传数了



    • 看一下终端,是不是显示not found!