Guest User

Untitled

a guest
Feb 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import serial
  2.  
  3. ser = serial.Serial('COM32', baudrate=115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE,
  4. bytesize=serial.EIGHTBITS, xonxoff=1)
  5. text = open("temptext1.txt", "a+")
  6. while 1:
  7. read_line = ser.readline()
  8. print read_line
  9. text.write(read_line)
Add Comment
Please, Sign In to add comment