We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1942a8a commit a30ba79Copy full SHA for a30ba79
weight_predict/weight_predict.py
@@ -1,5 +1,5 @@
1
import json
2
-
+from time import sleep
3
import serial
4
from typing import List, Tuple
5
from data_classes import Item
@@ -122,12 +122,15 @@ def main():
122
baudrate=115200,
123
bytesize=serial.EIGHTBITS,
124
parity=serial.PARITY_NONE,
125
- stopbits=serial.STOPBITS_ONE
+ stopbits=serial.STOPBITS_ONE,
126
+ timeout=1
127
)
128
129
130
while True:
131
132
+ sleep(0.1)
133
+
134
line = esp_uart_port.readline().decode('utf-8', errors='ignore').strip()
135
136
if not line:
0 commit comments