Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Need Help With Serial Port

surfthefreedomsurfthefreedom Member Posts: 1
Hello All,

I'm trying to put together a script (in Perl) that will constantly monitor the serial port for input. If there is input, then I'd like it to capture that data and have it sent to the main program. The serial port will be connected to a microboard that will be outputting data at random rates.

Is there a module that would make my life a little easier???

I appreciate any and all help.

Thanks

jj

Comments

  • netgertnetgert Member Posts: 331
    : Hello All,
    :
    : I'm trying to put together a script (in Perl) that will constantly monitor the serial port for input. If there is input, then I'd like it to capture that data and have it sent to the main program. The serial port will be connected to a microboard that will be outputting data at random rates.
    :
    : Is there a module that would make my life a little easier???
    :
    : I appreciate any and all help.
    :
    : Thanks
    :
    : jj
    :
    If you haven't noticed, this is PHP messageboard
    Perl's is here: http://www.programmersheaven.com/c/MsgBoard/wwwboard.asp?Board=12&src=17&Setting=
    [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]

  • DarQDarQ Member Posts: 1,625
    yeah, lemme remove this topic to perl board


    : If you haven't noticed, this is PHP messageboard
    : Perl's is here: http://www.programmersheaven.com/c/MsgBoard/wwwboard.asp?Board=12&src=17&Setting=
    : [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]
    :
    :

    [size=5][italic][blue]Dar[RED]Q[/RED][/blue][/italic][/size]
    NEW url--> http://mark.space.servehttp.com

  • JonathanJonathan Member Posts: 2,914
    Oooh...an import. ;-)

    As for whether there's a module, the answer is yes. Device::SerialPort is a fairly cross-platform one:-
    http://search.cpan.org/~cook/Device-SerialPort-0.22/SerialPort.pm

    If you only care about it working on Windows (not just now, but in the future), there's this one which may give you better performance:-
    http://search.cpan.org/author/BBIRTH/Win32-SerialPort-0.19/lib/Win32/SerialPort.pm

    FYI, the Win32 one is based around a more general module:-
    http://search.cpan.org/~bbirth/Win32-SerialPort-0.19/lib/Win32API/CommPort.pm

    Hope this helps,

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Sign In or Register to comment.