lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am new in Lua and I just start developing for OpenWRT in a Dragino platform.

I want to develop an application that reads data from Uart and print it in a Luci based web page.

But I am having a problem that I described here :

When I execute the code :
print("Dragino Uart Test started\n")
while 1 do"/dev/ttyS0","r")
    print(serialin:read())    --print the data

I read the serial port but I receive an echo too and the read() waits until a new line character to return.

There is any other way to read from a serial port ?

Thank you for your help, I appreciate it.

Helen Fornazier