esp32: log startup and UART receive for debugging
Made-with: Cursor
This commit is contained in:
1 parent
81bf4dded5
commit
2d2032e8b9
1 file changed
+3
@@ -51,11 +51,14 @@ def ensure_peer(addr):
|
||||
raise
|
||||
|
||||
|
||||
print("Starting ESP32 main.py")
|
||||
|
||||
while True:
|
||||
if uart.any():
|
||||
data = uart.read()
|
||||
if not data or len(data) < 6:
|
||||
continue
|
||||
print(f"Received data: {data}")
|
||||
addr = data[:6]
|
||||
payload = data[6:]
|
||||
ensure_peer(addr)
|
||||
|
||||
Reference in new issue
Block a user