lua-users home
lua-l archive

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


On 05-Nov-17 15:10, dyngeccetor8 wrote:
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?

Interesting. But how do you set serial speed and port features (byte format, no echo, no hardware handshake, raw data, etc.)?

--
  Enrico