python_serial_test.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import serial, sys
4 
5 if len(sys.argv) != 2:
6  print "python: Usage_serial_test <port name like: /dev/ttyUSB0>"
7  sys.exit(1)
8 
9 sio = serial.Serial(sys.argv[1], 115200)
10 sio.timeout = 250
11 
12 while True:
13  sio.write("Testing.")
14  print sio.read(8)
15 


serial
Author(s): William Woodall , John Harrison
autogenerated on Thu Jan 9 2020 07:18:58