09.01.2020, 13:14
Hi,
I need to use 2xRS485 on LM5 Lite.
on RS485-1 all is working, but on RS485-2 not. (seems to be using rs232)
Script:
if not port then
require('serial')
port = serial.open('/dev/RS485-2', { baudrate = 9600, parity = 'even', duplex = 'half' })
port:flush()
end
if port then
char = port:read(1, 1)--send back if read succeeded
if char then
port:write(char)
end
end
Tnx. Auzzii
I need to use 2xRS485 on LM5 Lite.
on RS485-1 all is working, but on RS485-2 not. (seems to be using rs232)
Script:
if not port then
require('serial')
port = serial.open('/dev/RS485-2', { baudrate = 9600, parity = 'even', duplex = 'half' })
port:flush()
end
if port then
char = port:read(1, 1)--send back if read succeeded
if char then
port:write(char)
end
end
Tnx. Auzzii