[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua, and accessing nodes in /dev/ (Lua in Linux)...
- From: David Given <dg@...>
- Date: Thu, 9 Feb 2006 00:29:20 +0000
On Wednesday 08 February 2006 23:25, Matthew Percival wrote:
> tty = io.open("/dev/ttyS0", "rw")
> if (tty:read("*line") ~= "OK") then
Firstly, have you set up the serial port correctly --- baud rate an such like?
(You can use the stty command to do this from the command line.) Secondly,
you'll need to ensure that all output gets flushed before you start reading.
Does calling tty:flush() after that write help?
+- David Given --McQ-+
| email@example.com | "Home is where, when you have to go there, they
| (firstname.lastname@example.org) | have to take you in." --- Cordelia Naismith
+- www.cowlark.com --+
Description: PGP signature