-
-
28 Jun 2017 22:41:40 UTC
- Distribution: RPi-BMP180
- Module version: 2.3604
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (30 / 0 / 0)
- Kwalitee
Bus factor: 1- 83.33% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (3.82KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- RPi::WiringPi::Constant
- WiringPi::API
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
RPi::BMP180 - Interface to the BMP180 barometric pressure sensor
SYNOPSIS
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
DESCRIPTION
This module allows you to interface with a BMP180 barometric and temperature sensor.
METHODS
new($pin_base)
Returns a new
RPi::BMP180
object.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
or200
.temp
Fetches the temperature from the sensor.
Parameters:
$want
Optional: String. By default, we return Farenheit. To get Celcius, pass in
'c'
.Returns a floating point number.
pressure
Fetches the barometric pressure in kPa.
Takes no parameters, returns a floating point number.
AUTHOR
Steve Bertrand, <steveb@cpan.org>
COPYRIGHT AND LICENSE
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.
Module Install Instructions
To install RPi::BMP180, copy and paste the appropriate command in to your terminal.
cpanm RPi::BMP180
perl -MCPAN -e shell install RPi::BMP180
For more information on module installation, please visit the detailed CPAN module installation guide.