python_serial_test.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import serial, sys
00004 
00005 if len(sys.argv) != 2:
00006     print "python: Usage_serial_test <port name like: /dev/ttyUSB0>"
00007     sys.exit(1)
00008 
00009 sio = serial.Serial(sys.argv[1], 115200)
00010 sio.timeout = 250
00011 
00012 while True:
00013     sio.write("Testing.")
00014     print sio.read(8)
00015 


serial
Author(s): William Woodall , John Harrison
autogenerated on Thu Mar 28 2019 03:29:52