mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-23 04:04:54 +08:00
Updating tests while testing on linux
This commit is contained in:
parent
8b2c7d4359
commit
cac9ae42c0
@ -1,5 +1,6 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
|
||||
15
tests/proof_of_concepts/python_serial_test.py
Normal file
15
tests/proof_of_concepts/python_serial_test.py
Normal file
@ -0,0 +1,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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user