faktor1000

This commit is contained in:
Jens Ullmert 2022-07-27 17:08:12 +02:00
parent b487e38c1f
commit b207cb6e77

View File

@ -102,7 +102,7 @@ def sendDMX(data):
global DMXSLP
while True:
with serial.Serial('/dev/serial0', baudrate=250000, timeout=DMXSLP, stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition
with serial.Serial('/dev/serial0', baudrate=250000, timeout=(DMXSLP/1000.0), stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition
#DMXSER.cancel_read()
# GPIO_18 to switch RS-485 driver (IC1) to TX-mode
@ -125,7 +125,7 @@ def sendDMX(data):
GPIO.output(18, GPIO.LOW)
# Sleep between TX packages, use time to get RDM packages
print("start read")
print("start read for ", (DMXSLP/1000.0), "ms")
DMXRDM = DMXSER.read(400)
print("end read")