Skip to content

Instantly share code, notes, and snippets.

@dubkov
Created November 13, 2018 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dubkov/d50548d4cc16f268a8296b813f374cf2 to your computer and use it in GitHub Desktop.
Save dubkov/d50548d4cc16f268a8296b813f374cf2 to your computer and use it in GitHub Desktop.
pyser.py
import serial
from time import sleep
ser = serial.Serial('/dev/ttyUSB0')
ser.baudrate = 115200
while (1):
line = ser.readline()
line = line.decode("utf-8")
first_param, second_param = line.split(",")
print(int(first_param), int(second_param))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment