This commit is contained in:
Jens Ullmert 2022-07-27 15:07:52 +02:00
parent c36f42ea9b
commit 0a569f876e

View File

@ -100,8 +100,8 @@ def sendDMX(data):
global DMXRDMFLAG global DMXRDMFLAG
global DMXRDM global DMXRDM
while True:
with serial.Serial('/dev/serial0', baudrate=250000, timeout=1, stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition with serial.Serial('/dev/serial1', baudrate=250000, timeout=1, 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
@ -339,7 +339,3 @@ GPIO.output(4, GPIO.LOW)
asyncio.get_event_loop().run_until_complete( asyncio.get_event_loop().run_until_complete(
websockets.serve(websworker, port=6789)) websockets.serve(websworker, port=6789))
asyncio.get_event_loop().run_forever() asyncio.get_event_loop().run_forever()
print("start")
while True:
sendDMX(DMXDATA)