RPi::PIGPIO::LED - Turn on and off a led connected to the RaspberryPi GPIO
Uses the pigpio C library turn on and off a led connected to a local or remote RapsberryPi
What this actually does is set the GPIO to output and allow you to set the levels to HI or LOW
Create a new object
Usage:
my $led = RPi::PIGPIO::LED->new($pi,$gpio);
Arguments: $pi - an instance of RPi::PIGPIO $gpio - GPIO number to which the LED is connected
Turn on the led
Usage :
$led->on();
Turn off the led
$led->off();
To install RPi::PIGPIO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RPi::PIGPIO
CPAN shell
perl -MCPAN -e shell install RPi::PIGPIO
For more information on module installation, please visit the detailed CPAN module installation guide.