feat(bridge): add wifi/serial bridge runtime and UI
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
16
tests/bridge_uart_sample.py
Normal file
16
tests/bridge_uart_sample.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from machine import UART, Pin
|
||||
import time
|
||||
|
||||
#set baudrate closest to 1000000
|
||||
baudrate = 921600
|
||||
uart = UART(1, baudrate=baudrate, tx=Pin(2), rx=Pin(3))
|
||||
|
||||
print("Sending 'Hello, World!'")
|
||||
uart.write(b'Hello, World!')
|
||||
while True:
|
||||
if uart.any():
|
||||
data = uart.read()
|
||||
print(data)
|
||||
uart.write(data)
|
||||
else:
|
||||
time.sleep(0.01)
|
||||
Reference in New Issue
Block a user