We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d658023 commit 1df92eeCopy full SHA for 1df92ee
1 file changed
02.inputs/uart.py
@@ -0,0 +1,12 @@
1
+import time
2
+from machine import UART
3
+
4
+uart = UART(2) # UART(2) RX16 TX17
5
+uart.init(57600, bits=8, parity=None, stop=1)
6
7
+while True:
8
+ recvlen = uart.any()
9
+ if recvlen > 0:
10
+ uart.write(uart.read(1))
11
+ # uart.write("hello\n")
12
+ # time.sleep(1)
0 commit comments