public class BMP180 extends Object implements ThermometerInterface, BarometerInterface, Closeable
Modifier and Type | Class and Description |
---|---|
static class |
BMP180.BMPMode
Relationship between sampling mode and conversion delay (in ms) for each
sampling mode Ultra low power: 4.5 ms minimum conversion delay Standard:
7.5 ms High Resolution: 13.5 ms Ultra high Resolution: 25.5 ms
|
Constructor and Description |
---|
BMP180(BMP180.BMPMode mode)
Constructor
|
BMP180(int controllerNumber,
int clockFrequency,
BMP180.BMPMode mode) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
float |
getPressure()
Read the barometric pressure (in hPa) from the device.
|
float |
getTemperature()
Method for reading the temperature.
|
void |
readCalibrationData()
This method reads the calibration data common for the Temperature sensor
and Barometer sensor included in the BMP180
|
public BMP180(BMP180.BMPMode mode) throws RuntimeIOException
mode
- BMP180 operating mode (low power .. ultra-high resolution)RuntimeIOException
- if an I/O error occurspublic BMP180(int controllerNumber, int clockFrequency, BMP180.BMPMode mode) throws RuntimeIOException
RuntimeIOException
public void readCalibrationData() throws RuntimeIOException
RuntimeIOException
- if an I/O error occurspublic float getTemperature() throws RuntimeIOException
getTemperature
in interface ThermometerInterface
RuntimeIOException
- If there is an IO error reading the sensorpublic float getPressure() throws RuntimeIOException
getPressure
in interface BarometerInterface
RuntimeIOException
- if an IO error occurspublic void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2016–2017 mattjlewis. All rights reserved.