10 lines
198 B
Python
10 lines
198 B
Python
import serial
|
|
import requests
|
|
ser = serial.Serial('/dev/ttyUSB0')
|
|
|
|
while True:
|
|
line = ser.readline()
|
|
out = requests.post("http://localhost:3000/reply",data=line.decode()[:-1])
|
|
|
|
|
|
ser.close()
|