doorstroom functie voor gemak
This commit is contained in:
@@ -2,7 +2,7 @@ from time import sleep
|
||||
|
||||
import serial
|
||||
|
||||
INPUT_PORT = '/dev/ttyUSB0'
|
||||
INPUT_PORT = '/dev/ttyUSB1'
|
||||
OUTPUT_PORT = '/dev/ttyUSB0'
|
||||
|
||||
serialInput = serial.Serial(INPUT_PORT, 115200, timeout=1)
|
||||
@@ -16,4 +16,9 @@ def lees():
|
||||
def verzend(telegram):
|
||||
serialOutput.write(telegram.__str__().encode('ascii'))
|
||||
print(telegram)
|
||||
sleep(1)
|
||||
sleep(1)
|
||||
|
||||
def doorstroom():
|
||||
line = serialInput.readline()
|
||||
serialOutput.write(line)
|
||||
print(line)
|
||||
Reference in New Issue
Block a user