星瞳实验室APP,快速收到回复
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 在使用UART功能时,提示OSError :[Errno 110] ETIMEOUT是为什么啊?怎么解决啊?



    • # UART Control
      #
      # This example shows how to use the serial port on your OpenMV Cam. Attach pin
      # P4 to the serial input of a serial LCD screen to see "Hello World!" printed
      # on the serial LCD display.
      
      import time
      from pyb import UART
      
      # Always pass UART 3 for the UART number for your OpenMV Cam.
      # The second argument is the UART baud rate. For a more advanced UART control
      # example see the BLE-Shield driver.
      uart = UART(4, 115200)
      
      while(True):
          l=([i for i in range(120)])
      
          for i in range(0,120,1):
              uart.write("!")
              out = '%d' % (l[i]/100)
              uart.write(out)
              out = '%d' % (l[i]/10%10)
              uart.write(out)
              out = '%d' % (l[i]%10)
              uart.write(out)
      
              #uart.write('d')
              #time.sleep(100)
          #uart.write("Hello World!\r")
          #uart.write('A')
      
          #time.sleep(1000)
      
      

      0_1557475215468_130135ae-9b53-499a-bf4f-f5b8f6d2d39c-image.png





    • OpenMV没有串口4,而且你的固件怎么回事?