lua-users home
lua-l archive

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

On Wed, Jan 6, 2010 at 4:42 PM, King, Mike <> wrote:
>> Any thought about making this cross-platform? I really need Linux and Windows.
> I don't know Linux will enough so probably not.

What's so cool about serial on Linux is that you really can just open
/dev/ttyS0 (aka 'COM1') and treat it like any file (tho remember to
f:flush() occaisionally). Except, you need to set the comm parameters
first.  There are several command-line utilities for that, can just
shell out to them using os.execute()

OK, this is not exactly portable.  I do have Linux serial
terminal-setting code, I'll have a look at Mike's interface and see
how it can fit in.

steve d.