Re: How to access serial port data in Linux using Euphoria?
- Posted by ChrisB (moderator) Aug 30, 2008
- 1032 views
Hi
Set the serial port wih setserial
open the port for read or write eg open("
dev
ttyS0", "r") (may need to be root for this, or allow program to have access)
get bytes from the serial port with getc or gets
put bytes with put putc or puts
Remember that on linux all files, terminals, ports access etc are just streams of data, you just have to tell the computer where to put them. While the above is obviously extremely simplified, its a good starting point for experiments.
Read everything else you can, there's no simple one size fits all solution.
If you're wanting to do modem stuff just use mgetty
Chris