Files
PowerBank_Python/uart.py

16 lines
206 B
Python

import machine
import utime
uart = machine.UART(1)
uart.write("hello") # Send "hello" over UART
utime.sleep(0.5)
while True:
if uart.any():
line = uart.readline()
print(line)