Rev | Author | Line No. | Line |
---|---|---|---|
3425 | kaklik | 1 | import serial |
2 | |||
3 | ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1) |
||
4 | print ser.name |
||
5 | ser.write("hello") |
||
6 | http://pyserial.sourceforge.net/shortintro.html |
||
7 | line = ser.readline() # read a '\n' terminated line |
||
8 | ser.close() |
||
9 |