Contents Up Previous Next

HiPi::Wiring::Pin

MODULE NOT YET IMPLEMENTED

HiPi::Wiring::Pin provides an implementation of HiPi::Pin for the HiPi::Wiring module

The module inherits all of its methods from HiPi::Pin.

See Also

Example Usage

use 5.14.0; # for say
use HiPi::Wiring;
use HiPi::Constant qw( :raspberry );

my $wpi  = HiPi::Wiring->new();
my $pin  = $wpi->get_pin( RPI_PAD1_PIN_11 );
my $mode = $pin->mode();

if( $mode & RPI_PINMODE_OUTP ) {
    # set high
    $pin->value(1);
} elsif(  $mode & RPI_PINMODE_INPT ) { 
    say q(Current Pin Value is :) . $pin->value();

    # set rising edge interrupt
    $pin->interrupt( RPI_INT_RISE );
}




Contents Up Previous Next


HiPi Modules Copyright © 2013 Mark Dootson