serial1 to ttyAMA0?

This commit is contained in:
Jens Ullmert 2022-07-27 15:17:11 +02:00
parent 0a569f876e
commit ce390fe6e2

View File

@ -101,7 +101,7 @@ def sendDMX(data):
global DMXRDM global DMXRDM
while True: while True:
with serial.Serial('/dev/serial1', baudrate=250000, timeout=1, stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition with serial.Serial('/dev/ttyAMA0', 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