Wat veranderingen, maar geen progressie
This commit is contained in:
@@ -2,18 +2,18 @@ from time import sleep
|
||||
|
||||
import serial
|
||||
|
||||
INPUT_PORT = '/dev/ttyUSB1'
|
||||
INPUT_PORT = '/dev/ttyUSB0'
|
||||
OUTPUT_PORT = '/dev/ttyUSB0'
|
||||
|
||||
dataInput = serial.Serial(INPUT_PORT, 115200, timeout=1)
|
||||
dataOutput = serial.Serial(OUTPUT_PORT, 115200, timeout=1)
|
||||
serialInput = serial.Serial(INPUT_PORT, 115200, timeout=1)
|
||||
serialOutput = serial.Serial(OUTPUT_PORT, 115200, timeout=1)
|
||||
|
||||
def lees():
|
||||
line = dataInput.readline()
|
||||
dataOutput.write(line)
|
||||
while True:
|
||||
line = serialInput.readline()
|
||||
print(line)
|
||||
|
||||
def verzend(telegram):
|
||||
for line in telegram:
|
||||
print(line)
|
||||
dataOutput.write(line)
|
||||
sleep(1)
|
||||
serialOutput.write(telegram.__str__().encode('ascii'))
|
||||
print(telegram)
|
||||
sleep(1)
|
||||
Reference in New Issue
Block a user