Device::BusPirate::Mode - base class for Device::BusPirate modes
Device::BusPirate::Mode
Device::BusPirate
The following methods are implemented by all the various mode subclasses.
$pirate = $mode->pirate
Returns the underlying Device::BusPirate instance.
$mode->power( $power )->get
Enable or disable the VREG 5V and 3.3V power outputs.
VREG
$mode->pullup( $pullup )->get
Enable or disable the IO pin pullup resistors from Vpu. These are connected to the MISO, CLK, MOSI and CS pins.
Vpu
MISO
CLK
MOSI
CS
$mode->aux( $aux )->get
Set the AUX output pin level.
AUX
$mode->cs( $cs )->get
Set the CS output pin level.
$mode->set_pwm( freq => $freq, duty => $duty )->get
Sets the PWM generator to the given frequency and duty cycle, as a percentage. If unspecified, duty cycle will be 50%. Set frequency to 0 to disable.
$voltage = $mode->read_adc_voltage->get
Reads the voltage on the ADC pin and returns it as a numerical value in volts.
Paul Evans <leonerd@leonerd.org.uk>
To install Device::BusPirate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::BusPirate
CPAN shell
perl -MCPAN -e shell install Device::BusPirate
For more information on module installation, please visit the detailed CPAN module installation guide.