VirtualBox

Ticket #17093: client.py

File client.py, 290 bytes (added by domyes, 7 years ago)
Line 
1#!/usr/bin/python
2import serial
3import time
4
5com = serial.Serial(port='/dev/ttyS3', baudrate=57600, rtscts=True)
6com.flushInput()
7
8# Read sent bytes
9while True:
10 in_waiting = com.in_waiting
11 a = com.read(in_waiting)
12 print '%d: %r' % (in_waiting, a)
13 time.sleep(1)

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy