Skip to content

Commit 558df93

Browse files
committed
1 parent 0db98b4 commit 558df93

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

02.inputs/uart.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
uart = UART(2) # UART(2) RX16 TX17
55
uart.init(57600, bits=8, parity=None, stop=1)
66

7-
time.sleep(1)
8-
uart.write("hello\n")
9-
107
while True:
118
recvlen = uart.any()
129
if recvlen > 0:
13-
uart.write(uart.read(recvlen))
10+
buffer = uart.read(recvlen)
11+
uart.write(buffer)
12+
print(buffer)

0 commit comments

Comments
 (0)