News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
io.open /dev/ttyS0
Author Message
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
io.open /dev/ttyS0

Hi,

has anybody ever used murgaLua to communicate with a serial device ?
I'd like to write a userfriendly GUI for settings some modem switches.

Code fraqment:

Code:
port="/dev/ttyS0";
in=io.open(port,"r");
out=io.open(port,"w");

while(true) do
result=in:read("*line");
if(string.find(result,"RING")) then
out:write("ATA\n");
end
end



This is just a simple stupid stuff, but later useful for robotic applications
Any idea ?
Thanks
Bye
Christian

07-18-2007 07:45 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
io.open /dev/ttyS0 - chrimo - 07-18-2007 07:45 AM
RE: io.open /dev/ttyS0 - chrimo - 07-29-2007, 09:18 PM
RE: io.open /dev/ttyS0 - chrimo - 07-30-2007, 05:51 AM
RE: io.open /dev/ttyS0 - JohnMurga - 07-30-2007, 05:25 PM
RE: io.open /dev/ttyS0 - chrimo - 07-30-2007, 06:13 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: