This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Rs 485
#2
This script will log every received character in hexadecimal form.
Code:
port = require('serial').open('/dev/RS485-1', {
  baudrate = 9600,
  parity = 'even',
  duplex = 'half',
})

while true do
  ch = port:read(1, 1)
  if ch then
    loghex(ch)
  end
end
Reply


Messages In This Thread
Rs 485 - by a455115 - 14.12.2023, 07:38
RE: Rs 485 - by admin - 14.12.2023, 09:43
RE: Rs 485 - by AISystem - 14.12.2023, 14:45
RE: Rs 485 - by admin - 14.12.2023, 14:49

Forum Jump: