This commit is contained in:
Juul
2025-07-23 22:27:40 +02:00
parent 4151c7cf5a
commit ab3e04ab57
6 changed files with 129 additions and 47 deletions
+7 -7
View File
@@ -2,18 +2,18 @@ from time import sleep
import serial
INPUT_PORT = '/dev/ttyUSB0'
INPUT_PORT = '/dev/ttyUSB1'
OUTPUT_PORT = '/dev/ttyUSB0'
# dataInput = serial.Serial(INPUT_PORT, 115200, timeout=1)
# dataOutput = serial.Serial(OUTPUT_PORT, 115200, timeout=1)
dataInput = serial.Serial(INPUT_PORT, 115200, timeout=1)
dataOutput = serial.Serial(OUTPUT_PORT, 115200, timeout=1)
# def lees():
# line = dataInput.readline()
# print(line)
def lees():
line = dataInput.readline()
dataOutput.write(line)
def verzend(telegram):
for line in telegram:
print(line)
# dataOutput.write(line)
dataOutput.write(line)
sleep(1)