RPi::BMP180 - Interface to the BMP180 barometric pressure sensor
use RPi::BMP180; my $base = 300; my $bmp = RPi::BMP180($base); my $f = $bmp->temp; my $c = $bmp->temp('c'); my $p = $bmp->pressure; # kPa
This module allows you to interface with a BMP180 barometric and temperature sensor.
Returns a new RPi::BMP180 object.
RPi::BMP180
Parameters:
$pin_base
Mandatory: Integer, the number at which to start the 'pseudo' GPIO pins for communication to the sensor. Anything above the highest numbered GPIO pin will do. For example, 100 or 200.
100
200
Fetches the temperature from the sensor.
$want
Optional: String. By default, we return Farenheit. To get Celcius, pass in 'c'.
'c'
Returns a floating point number.
Fetches the barometric pressure in kPa.
Takes no parameters, returns a floating point number.
Steve Bertrand, <steveb@cpan.org>
Copyright (C) 2016 by Steve Bertrand
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.2 or, at your option, any later version of Perl 5 you may have available.
To install RPi::BMP180, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RPi::BMP180
CPAN shell
perl -MCPAN -e shell install RPi::BMP180
For more information on module installation, please visit the detailed CPAN module installation guide.