导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. ary5
    A
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    ary5

    @ary5

    0
    声望
    3
    楼层
    413
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录

    ary5 关注

    ary5 发布的帖子

    • RE: openmv跟arduino脱机通信出问题

      @kidswong999 我们后面试出来,是接收端那边的问题,那边输入模式设置错了😂

      发布在 OpenMV Cam
      A
      ary5
    • openmv跟arduino脱机通信出问题

      问题就是,我openmv插上电脑USB供电的时候,arduino那边接受到我扫码的都是正常的,我脱机后,通上电,arduino那边会接受0,但是openmv此时还在扫码,没发送信息过去

      import time
      import sensor, image, time
      import json
      import pyb
      from pyb import UART
      global zuo,zhong,you
      zuo=0
      zhong=0
      you=0
      
      yellow_threshold   = ( 46,  100,  -68,   72,   58,   92)
      red_threshold =(39, 4, 67, 43, -29, 69)#红色颜色阈值
      green_threshold = (28, 4, -45, -8, -73, 47)#绿色颜色阈值
      blue_threshold=(46, 4, 53, -82, -113, -34)#蓝色颜色阈值
      #blue_threshold=(29, 49, -50, 25, -63, -35)
      
      red_color_code = 1   # code = 2^0 = 1
      green_color_code = 2 # code = 2^1 = 2
      blue_color_code = 4  #code=2^2=4
      black_color_code = 8 #code=2^3=8
      led = pyb.LED(3)
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QVGA)
      sensor.skip_frames(time = 2000)
      sensor.set_auto_gain(False) # must turn this off to prevent image washout...
      clock = time.clock()
      uart = UART(3, 9600, timeout_char = 1000)
      uart.init(9600, bits=8, parity=None, stop=1)
      c=d=1
      while(b2==1):
          uart = UART(3, 9600, timeout_char = 1000)
          uart.init(9600, bits=8, parity=None, stop=1)
          clock.tick()
          img = sensor.snapshot()
          img.lens_corr(0.8) # strength of 1.8 is good for the 2.8mm lens.
          for code in img.find_qrcodes():
              data_out = code.payload()
              if data_out:
                  uart.write(data_out)
                  print(data_out)
                  b2=2
      
      
      发布在 OpenMV Cam
      A
      ary5
    • 执行完扫码之后,下面的程序不能继续执行了

      就是本来想执行扫码之后,下面再接受指令进行颜色识别的,但是没反应

      发布在 OpenMV Cam
      A
      ary5