导航

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

    xbaw

    @xbaw

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

    xbaw 关注

    xbaw 发布的帖子

    • 为什么串口接受的数据始终是一个一个的字符?

      0_1690171669134_屏幕截图 2023-07-24 120046.png 0_1690171673132_屏幕截图 2023-07-24 120145.png 0_1690171678868_屏幕截图 2023-07-24 120204.png

      # 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(3, 19200, timeout_char=1000)
      
      while(True):
          if uart.any():
              a = uart.readline().decode().strip()     
              print(a)
      
      发布在 OpenMV Cam
      X
      xbaw
    • RE: 为什么串口接受的数据始终是一个一个字符?

      没有效果啊,还是跟楼主图片一样

      发布在 OpenMV Cam
      X
      xbaw