COSA
An Object-Oriented Platform for Arduino Programming
|
#include <BMP085.hh>
Classes | |
struct | param_t |
Public Types | |
enum | Mode { ULTRA_LOW_POWER = 0, STANDARD = 1, HIGH_RESOLUTION = 2, ULTRA_HIGH_RESOLUTION = 3 } |
Public Member Functions | |
BMP085 () | |
bool | begin (Mode mode=ULTRA_LOW_POWER) |
bool | sample_temperature_request () |
bool | read_temperature () |
bool | sample_temperature () |
bool | sample_pressure_request () |
bool | read_pressure () |
bool | sample_pressure () |
bool | sample () |
int16_t | temperature () const |
int32_t | pressure () const |
Protected Attributes | |
param_t | m_param |
Mode | m_mode |
uint8_t | m_cmd |
uint16_t | m_start |
int32_t | B5 |
int32_t | m_pressure |
Static Protected Attributes | |
static const uint8_t | TEMP_CONV_MS = 5 |
static const uint8_t PRESSURE_CONV_MS[] | __PROGMEM |
static const uint8_t | COEFF_REG = 0xAA |
static const uint8_t | CMD_REG = 0xF4 |
static const uint8_t | RES_REG = 0xF6 |
static const uint8_t | TEMP_CONV_CMD = 0x2E |
static const uint8_t | PRESSURE_CONV_CMD = 0x34 |
Private Member Functions | |
bool | is_async () const |
void | sync_request () |
void | async_request () |
virtual void | on_completion (uint8_t type, int count) |
Private Attributes | |
uint8_t | m_addr |
bool | m_async |
Cosa TWI driver for Bosch BMP085 Digital pressure sensor
The GY-80 10DOF module with pull-up resistors (4K7) for TWI signals and 3V3 internal voltage converter.
enum BMP085::Mode |
|
inline |
bool BMP085::begin | ( | Mode | mode = ULTRA_LOW_POWER | ) |
Initiate device driver. Load calibration coefficients from device. Return true if successful otherwise false.
[in] | mode | oversampling mode (Default ULTRA_LOW_POWER). |
Definition at line 34 of file BMP085.cpp.
|
inline |
bool BMP085::read_pressure | ( | ) |
Read the raw pressure sensor. Return true(1) if successful otherwise false.
Definition at line 113 of file BMP085.cpp.
bool BMP085::read_temperature | ( | ) |
Read the raw temperature sensor. Will wait for the conversion to complete. Return true(1) if successful otherwise false.
Definition at line 68 of file BMP085.cpp.
|
inline |
|
inline |
bool BMP085::sample_pressure_request | ( | ) |
Issue a sample request of the raw pressure sensor. Will wait for the conversion to complete. Return true(1) if successful otherwise false.
Definition at line 96 of file BMP085.cpp.
|
inline |
bool BMP085::sample_temperature_request | ( | ) |
Issue a sample raw temperature sensor request. Return true(1) if successful otherwise false.
Definition at line 51 of file BMP085.cpp.
|
inline |
|
staticprotected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |