串口通信到电脑上,没有反应
-
1、硬件:USB转TTL,P4接RXD,P5接TXD,VCC接VIN,GND接GND
2、软件:串口助手
3、代码:IDE的自带uart代码
4、串口助手就是没有收到HELLOWORLD# 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, 9600) while(True): uart.write("Hello World!\r") time.sleep_ms(1000)
-
tx rx接反了吧