faktor1000
This commit is contained in:
parent
b487e38c1f
commit
b207cb6e77
@ -102,7 +102,7 @@ def sendDMX(data):
|
|||||||
global DMXSLP
|
global DMXSLP
|
||||||
|
|
||||||
while True:
|
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()
|
#DMXSER.cancel_read()
|
||||||
|
|
||||||
# GPIO_18 to switch RS-485 driver (IC1) to TX-mode
|
# GPIO_18 to switch RS-485 driver (IC1) to TX-mode
|
||||||
@ -125,7 +125,7 @@ def sendDMX(data):
|
|||||||
GPIO.output(18, GPIO.LOW)
|
GPIO.output(18, GPIO.LOW)
|
||||||
|
|
||||||
# Sleep between TX packages, use time to get RDM packages
|
# 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)
|
DMXRDM = DMXSER.read(400)
|
||||||
print("end read")
|
print("end read")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user