aboutsummaryrefslogtreecommitdiffstats
path: root/source/serial/tests/proof_of_concepts/python_serial_test.py
blob: 6f92b84a2d8317724e4b4163c65b7d69d4e7f33c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python

import serial, sys

if len(sys.argv) != 2:
    print "python: Usage_serial_test <port name like: /dev/ttyUSB0>"
    sys.exit(1)

sio = serial.Serial(sys.argv[1], 115200)
sio.timeout = 250

while True:
    sio.write("Testing.")
    print sio.read(8)