logo

在使用UART功能时,提示OSError :[Errno 110] ETIMEOUT是为什么啊?怎么解决啊?

2019-05-10 16:00
E
_15716188289
# 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)
f72efd54-6778-4d93-a638-49bb8d6c40c6.png
2019-05-10 21:19
E
_15716188289

@kidswong999

2019-05-11 00:26
I
网红小智智 星瞳科技

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