11 lines
170 B
Python
Executable file
11 lines
170 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
import serial
|
|
|
|
while 1:
|
|
try:
|
|
ser = serial.Serial('/dev/ttyUSB0', 9600)
|
|
while 1:
|
|
print ser.readline()
|
|
except Exception, e:
|
|
pass
|