24.09.2025, 09:42
Run this as a resident script and post what you get in LM Logs tab:
Code:
require('serial')
port = serial.open('/dev/ttyACM0')
port:flush()
buf = {}
while true do
char = port:read(1, 1)
if char then
if char == '\r' or char == '\n' then
if #buf > 0 then
line = table.concat(buf)
log(line)
buf = {}
end
else
buf[ #buf + 1 ] = char
end
end
end