[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua serial library. Wich?
- From: dyngeccetor8 <dyngeccetor8@...>
- Date: Sun, 5 Nov 2017 14:10:08 +0000
On 11/05/2017 09:14 AM, José María Martínez García wrote:
> Hello all.
> Sorry.
> I'm searching a Lua library for serial communication.
>
> I'd found "lua-serial" in Github, but it seems that works on Win32, Win64, and
> Linux 32 but not on Linux 64. I can't compile it.
>
> Also I'd found a rs232 in Luarocks but it seems that are necessary a lot of
> dependencies. I tried to install some of them but i obtained a lot of errors and
> the dependencies list grown up quickly.
I had similar problem when mated Lua with Arduino. Bare opening device as file
works well:
file_name = '/dev/ttyUSB0'
comm_read = assert(io.open(file_name, 'r'))
comm_read:setvbuf('no')
comm_read:flush()
comm_write = assert(io.open(file_name, 'w'))
comm_write:setvbuf('no')
comm_write:flush()
Or you need some specific features?
-- Martin