Logic Machine Forum
Activate RS-485 second port on LM5 lite - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Hardware (https://forum.logicmachine.net/forumdisplay.php?fid=12)
+--- Thread: Activate RS-485 second port on LM5 lite (/showthread.php?tid=2419)



Activate RS-485 second port on LM5 lite - Auzzii - 09.01.2020

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


RE: Activate RS-485 second port on LM5 lite - Daniel - 09.01.2020

Hi
Try to run this self check
https://forum.logicmachine.net/showthread.php?tid=1939&pid=13139#pid13139