导航

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

    acqs 发布的帖子

    • 代码错误:TypeError: object 'int' is not a tuple or list

      wall_threshold = (42, 57, -57, -38, 14, 42)
      blobs = img.find_blobs([wall_threshold])
      为什么会弹这个错误呢

      发布在 OpenMV Cam
      A
      acqs
    • openmv连了电源以后温度上升很快(比刚用的时候烫很多),但程序还能运行,应该怎么办。

      openmv连了电源以后温度上升很快(比刚用的时候烫很多),但程序还能运行,应该怎么办。

      发布在 OpenMV Cam
      A
      acqs
    • RE: 连电脑后,led闪绿灯后闪黄灯,摄像头拍的是白屏,芯片很烫是怎么回事。

      0_1540800643339_8c2ecc0d-4180-4893-aab1-4fa2a1723b16-image.png

      发布在 OpenMV Cam
      A
      acqs
    • RE: 连电脑后,led闪绿灯后闪黄灯,摄像头拍的是白屏,芯片很烫是怎么回事。

      显示不了图像,是白屏0_1540800372666_354cc4dcc8e244c972fe46caa09a352.png

      发布在 OpenMV Cam
      A
      acqs
    • RE: 连电脑后,led闪绿灯后闪黄灯,摄像头拍的是白屏,芯片很烫是怎么回事。

      hello world没问题,但是 img = sensor.snapshot()是一直白屏的,而且芯片很烫

      发布在 OpenMV Cam
      A
      acqs
    • RE: 连电脑后,led闪绿灯后闪黄灯,摄像头拍的是白屏,芯片很烫是怎么回事。

      import sensor, image, time
      from pid import PID
      from pyb import Pin, Timer, UART
      import time

      gnd = Pin('P0', Pin.OUT_PP)
      ain1 = Pin('P1', Pin.OUT_PP)
      bin1 = Pin('P2', Pin.OUT_PP)
      slp = Pin('P3', Pin.OUT_PP)
      gnd.low()
      ain1.low()
      bin1.low()
      slp.high()
      pwma = Pin('P7')
      pwmb = Pin('P8')
      tim = Timer(4, freq=1000)
      ch1 = tim.channel(1, Timer.PWM, pin=pwma)
      ch2 = tim.channel(2, Timer.PWM, pin=pwmb)
      ch1.pulse_width_percent(0)
      ch2.pulse_width_percent(0)

      30 -30
      def run(left_speed, right_speed):

      if left_speed < 0:
      	ain1.low()
      else:
      	ain1.high()
      ch1.pulse_width_percent(abs(left_speed))
      if right_speed < 0:
      	bin1.high()
      else:
      	bin1.low()
      ch2.pulse_width_percent(abs(right_speed))
      

      def Uart_sevor(zu,t_s):
      uart = UART(3, 9600, timeout_char=1000)
      uart.init(9600, bits=8, parity=None, stop=1, timeout_char=1000)
      TxBuf =bytearray([0x55,0x55,5,0x06,zu,0x01,0x00])
      uart.write(TxBuf)
      time.sleep(t_s*1000)

      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA)
      sensor.skip_frames(10)
      sensor.set_auto_whitebal(False)
      clock = time.clock()
      green_threshold = (62, 99, 45, -28, 80, 33)
      size_threshold = 5356
      x_pid = PID(p=0.3, i=1, imax=100)
      h_pid = PID(p=0.001, i=0.1, imax=30)
      def find_max(blobs):
      max_size=0
      for blob in blobs:
      if blob[2]*blob[3] > max_size:
      max_blob=blob
      max_size = blob[2]*blob[3]
      return max_blob
      Uart_sevor(0,1)
      while(True):
      clock.tick()
      img = sensor.snapshot()
      blobs = img.find_blobs([green_threshold])
      if blobs:
      max_blob = find_max(blobs)
      x_error = max_blob[5]-img.width()/2
      h_error = max_blob[2]*max_blob[3]-size_threshold
      img.draw_rectangle(max_blob[0:4])
      img.draw_cross(max_blob[5], max_blob[6])
      x_output=x_pid.get_pid(x_error,1)
      h_output=h_pid.get_pid(h_error,1)
      a = ((-h_output-x_output))
      b = ((-h_output+x_output))
      print("a",a)
      print("b",b)
      if(-200 < h_error < 200):
      run(0,0)
      Uart_sevor(1,10)
      break
      run(a,b)
      else:
      run(30,-30)

      发布在 OpenMV Cam
      A
      acqs
    • 连电脑后,led闪绿灯后闪黄灯,摄像头拍的是白屏,芯片很烫是怎么回事。

      0_1540799713821_77d0de3ca1634c8b0bb3c6af6956d69.png

      发布在 OpenMV Cam
      A
      acqs