Help for this page

Select Code to Download


  1. or download this
    use Win32::SerialPort;  # Use instead for Windows
    my $port=Win32::SerialPort->new("COM1") || die "couldn't open COM1";
    ...
           print "5\n";
    } while 1;
    $port->close;
    
  2. or download this
    $port = new-Object System.IO.Ports.SerialPort COM1,9600,None,8,one
    $port.open()
    $port.close()