mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 21:03:59 +02:00
parent
abf84f78f9
commit
e8cc152244
2 changed files with 26 additions and 50 deletions
|
@ -1,22 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from twisted.internet import reactor
|
||||
from twisted.internet.serialport import SerialPort
|
||||
from twisted.protocols.basic import LineOnlyReceiver
|
||||
from device import Device
|
||||
|
||||
class EduBrmSerial(LineOnlyReceiver):
|
||||
|
||||
def dataReceived(self, data):
|
||||
print 'dataReceived', data
|
||||
|
||||
def lineReceived(self, line):
|
||||
print 'lineReceived', data
|
||||
|
||||
def sendLine(self, line):
|
||||
pass
|
||||
|
||||
port = '/dev/ttyUSB0'
|
||||
baud = 9600
|
||||
|
||||
SerialPort(EduBrmSerial(), port, reactor, baud)
|
||||
reactor.run()
|
||||
d = Device()
|
||||
d.open('')
|
||||
d.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue