Re: [nottingham] Serial port data acquisition in Perl

From: Tom Bird (lists@janeway.hambule.co.uk)
Date: Tue 15 Jan 2002 - 14:34:38 GMT


On Mon, 14 Jan 2002, Matthew Sackman wrote:
> On Mon, Jan 14, 2002 at 07:03:17PM +0000, Tom Bird wrote:
> >
> > This is probably ugly, evil and just totally wrong, but when I needed to
> > send data to the serial port to control the little LCD screen thing I
> > acquired, I just used /dev/ttyS0 like a file and shoved the data into
> > that.
> >
> > It worked...
>
> I can't see why that's necessarily so wrong - all communication is
> via 'files' in *nix so why should doing that be so wrong?
>
> I've not looked through it, but quick search reveals the .deb
> libdevice-serialport-perl:
> libdevice-serialport-perl - Perl module for interacting with serial ports.

http://search.cpan.org/search?module=Device::SerialPort
http://search.cpan.org/doc/COOK/Device-SerialPort-0.12/Device-SerialPort.html

cpan installed it without arguing, I may modify the screen script to use
it at some point in the future.

-- 
Tom

http://www.hambule.co.uk/ tom@hambule.co.uk

-------------------------------------------------------------------- http://www.lug.org.uk http://www.linuxportal.co.uk http://www.linuxjob.co.uk http://www.linuxshop.co.uk --------------------------------------------------------------------



This archive was generated by hypermail 2.1.3 : Tue 15 Jan 2002 - 14:35:14 GMT