Subject: | Need a little help getting it going |
Date: | Fri, 3 May 2019 18:43:56 +0000 |
To: | "bug-RPi-PIGPIO [...] rt.cpan.org" <bug-RPi-PIGPIO [...] rt.cpan.org> |
From: | Knute Johnson <pi [...] knutejohnson.com> |
I downloaded RPi::PIGPIO from cpan and that appears to be successful. I
have pigpiod running and have tested it with a C program. I wrote a
little perl program but it fails to connect to the pigpiod daemon.
pi@raspberrypi3B-2:~/bin $ pig_test.pl
Can't call method "connected" on an undefined value at
/usr/local/share/perl/5.24.1/RPi/PIGPIO.pm line 1692.
The error is occurring in the connect method, not in the print method
after. I looked at the source but I don't know where the call
originated from so I'm kind of stuck.
#!/usr/bin/perl
use RPi::PIGPIO ':all';
my $pi = RPi::PIGPIO->connect('127.0.0.1');
print $pi->connected();
$pi->set_mode(16,PI_OUTPUT);
$pi->write(16,HI);
sleep 3;
$pi->write(16,LOW);
$pi->disconnect();
Not sure what I am missing but I would love to get this to work. If you
can point me to a support group or give me a hand getting it going that
would be great.
This is running on a RaspberryPi 3B+
perl 5.24.1 for arm-linux-gnueabihf-thread-multi-64-int
pigpio 1.64
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Thanks,
--
Knute Johnson
pi@knutejohnson.com