From cac9ae42c003c5be7a51b8cc9820b7949c3ed7cd Mon Sep 17 00:00:00 2001 From: Scott Martin Date: Mon, 23 Jan 2012 14:23:01 -0600 Subject: [PATCH] Updating tests while testing on linux --- examples/serial_example.cc | 1 + tests/proof_of_concepts/python_serial_test.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/proof_of_concepts/python_serial_test.py diff --git a/examples/serial_example.cc b/examples/serial_example.cc index af7b666..17474ca 100644 --- a/examples/serial_example.cc +++ b/examples/serial_example.cc @@ -1,5 +1,6 @@ #include #include +#include #include diff --git a/tests/proof_of_concepts/python_serial_test.py b/tests/proof_of_concepts/python_serial_test.py new file mode 100644 index 0000000..6f92b84 --- /dev/null +++ b/tests/proof_of_concepts/python_serial_test.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +import serial, sys + +if len(sys.argv) != 2: + print "python: Usage_serial_test " + sys.exit(1) + +sio = serial.Serial(sys.argv[1], 115200) +sio.timeout = 250 + +while True: + sio.write("Testing.") + print sio.read(8) +