in reply to Re: Accessing parallel ports
in thread Accessing parallel ports
I actually got it to work using the code below. I changed auto:0 to auto:1 and that did it.
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::linux # Set up your parallel port object and tell it what driver to use. my $parport = Device::ParallelPort->new('auto:1'); # $parport->set_bit(0,1); # $parport->set_bit(1, 1); $parport->set_bit(2, 1); $parport->set_bit(3, 1); $parport->set_bit(4, 1); $parport->set_bit(5, 1); $parport->set_bit(6, 1); $parport->set_bit(7, 1);
If I don't comment out the CGI lines I get an Internal Server Error, that's why I have them. Is there a serious problem with doing it this way?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Accessing parallel ports
by roboticus (Chancellor) on Jan 07, 2011 at 09:49 UTC | |
by tumoheat (Initiate) on Jan 08, 2011 at 05:52 UTC |