JeeLib
An easy interface to the port headers, the RF12 driver library, timers, low-power code, and more.
 All Classes Files Functions Variables Enumerations Macros Pages
BMP085 Class Reference

Interface for the Pressure Plug - see http://jeelabs.org/pp. More...

#include <PortsBMP085.h>

Inheritance diagram for BMP085:
DeviceI2C

Public Types

enum  { TEMP, PRES }
 

Public Member Functions

 BMP085 (const PortI2C &p, uint8_t osrs=0)
 Constructor for BMP085 class. More...
 
void setOverSampling (uint8_t osrs)
 Set the oversampling setting for the high resolution mode. More...
 
uint8_t startMeas (uint8_t type) const
 Start a measurement. More...
 
int32_t getResult (uint8_t type)
 Get the results from the last measurement. More...
 
int32_t measure (uint8_t type)
 Take a measurement. More...
 
void getCalibData ()
 Call this during setup() if you want to use calculate() later on.
 
void calculate (int16_t &tval, int32_t &pval) const
 Calculate the temperature and pressure based on the values stored by the last call to measure(). More...
 
- Public Member Functions inherited from DeviceI2C
 DeviceI2C (const PortI2C &p, uint8_t me)
 
bool isPresent () const
 see if a device answers at an I2C address
 
uint8_t send () const
 Create a start condition on the I2C bus, and set things up for sending data to this device. More...
 
uint8_t receive () const
 Create a start condition on the I2C bus, and set things up for receiving data from this device. More...
 
void stop () const
 Create a stop condition on the I2C bus, ending the current transfer.
 
uint8_t write (uint8_t data) const
 Write a byte to the currently addressed device. More...
 
uint8_t read (uint8_t last) const
 Read a byte from the currently addressed device. More...
 
void setAddress (uint8_t me)
 

Public Attributes

int32_t meas [2]
 
uint8_t oss
 

Detailed Description

Interface for the Pressure Plug - see http://jeelabs.org/pp.

Constructor & Destructor Documentation

BMP085::BMP085 ( const PortI2C p,
uint8_t  osrs = 0 
)
inline

Constructor for BMP085 class.

Parameters
pI2C port to be used.
osrs0..3 Oversampling setting.

Member Function Documentation

void BMP085::calculate ( int16_t &  tval,
int32_t &  pval 
) const

Calculate the temperature and pressure based on the values stored by the last call to measure().

Parameters
tvalVariable temperature value.
pvalRaw pressure value.
int32_t BMP085::getResult ( uint8_t  type)

Get the results from the last measurement.

Parameters
typeBMP::TEMP for temperature or BMP::PRES for pressure.
int32_t BMP085::measure ( uint8_t  type)
inline

Take a measurement.

Parameters
typeBMP::TEMP for temperature or BMP::PRES for pressure.
void BMP085::setOverSampling ( uint8_t  osrs)
inline

Set the oversampling setting for the high resolution mode.

Parameters
osrs0..3.
uint8_t BMP085::startMeas ( uint8_t  type) const

Start a measurement.

Parameters
typeBMP::TEMP for temperature or BMP::PRES for pressure.

The documentation for this class was generated from the following files: