File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1111MAX_ITEM_REMOVALS_TO_CHECK = 3
1212THRESHOLD_WEIGHT_PROBABILITY = 30
1313
14+ ESP_SERIAL_PORT = "/dev/ttyTHS1"
15+ PI_SERIAL_PORT = ""
16+
1417class Slot :
1518
1619 _previous_weight_value : float
@@ -124,15 +127,15 @@ def main():
124127
125128 # Set up uart ports
126129 esp_uart_port = serial .Serial (
127- port = "/dev/ttyTHS1" ,
130+ port = ESP_SERIAL_PORT ,
128131 baudrate = 115200 ,
129132 bytesize = serial .EIGHTBITS ,
130133 parity = serial .PARITY_NONE ,
131134 stopbits = serial .STOPBITS_ONE ,
132135 timeout = 1
133136 )
134137 pi_uart_port = serial .Serial (
135- port = "/dev/ttyTHS0" ,
138+ port = PI_SERIAL_PORT ,
136139 baudrate = 9600 ,
137140 bytesize = serial .EIGHTBITS ,
138141 parity = serial .PARITY_NONE ,
@@ -174,7 +177,7 @@ def main():
174177 'quantity' : item_change .quantity
175178 }
176179 json_str = json .dumps (json_data ) + "\n "
177-
180+
178181 # Send it to pi
179182 pi_uart_port .write (json_str .encode ('utf-8' ))
180183
You can’t perform that action at this time.
0 commit comments