8.ESP32–UART串口
"""
uart串口实验
2022.10.9
"""
from machine import Pin
from machine import UART
import time
uart=UART(2,115200,rx=16,tx=17)
if __name__=="__main__":
uart.write("Hello wrold")
while True:
if uart.any():
text=uart.read(128)
uart.write(text)