tumoheat has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I am trying to write to the parallel port pins from a Perl program running Ubuntu Linux, to light up led's on a bread board. I've already accomplished this on this same box using a C program, but I cannot get my code below to work. I believe the problem is with the line:
$parport = Device::ParallelPort->new('auto:0');
I've tried different variables between the ('') ticks, but nothing has worked. I use Perl on my web pages for forms, but this has me stumped. Any help would be appreciated. Code is below:
#!/usr/bin/perl require "subparseform.lib"; &Parse_Form; print "Set-cookie: cart_id=1234; user_id=123;\n"; print "Content-type: text/html\n\n"; use strict; use CGI; use Device::ParallelPort; # use Device::ParallelPort::drv; # use Device::ParallelPort::drv::linux # use Device::ParallelPort::drv::parport # Set up your parallel port object and tell it what driver to use. #my $parport = Device::ParallelPort->new('auto:0'); print "It works!!!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing parallel ports
by roboticus (Chancellor) on Dec 11, 2010 at 23:23 UTC | |
|
Re: Accessing parallel ports
by GrandFather (Saint) on Dec 12, 2010 at 01:43 UTC | |
|
Re: Accessing parallel ports
by Marshall (Canon) on Dec 12, 2010 at 04:59 UTC | |
|
Re: Accessing parallel ports
by Khen1950fx (Canon) on Dec 12, 2010 at 08:32 UTC | |
by tumoheat (Initiate) on Jan 07, 2011 at 06:02 UTC | |
by roboticus (Chancellor) on Jan 07, 2011 at 09:49 UTC | |
by tumoheat (Initiate) on Jan 08, 2011 at 05:52 UTC | |
by tumoheat (Initiate) on Jan 07, 2011 at 05:36 UTC | |
|
Re: Accessing parallel ports
by NiJo (Friar) on Dec 12, 2010 at 19:53 UTC |