upm
0.1.8
Sensor/Actuator repository for libmraa (v0.4.5)
|
C++ API for GY65 chip (Atmospheric Pressure Sensor) More...
This file defines the gy65 C++ interface for libgy65
Public Member Functions | |
GY65 (int bus, int devAddr, uint8_t mode=BMP085_ULTRAHIGHRES) | |
~GY65 () | |
int32_t | getPressure () |
int32_t | getPressureRaw () |
int16_t | getTemperatureRaw () |
float | getTemperature () |
int32_t | getSealevelPressure (float altitudeMeters=0) |
float | getAltitude (float sealevelPressure=101325) |
int32_t | computeB5 (int32_t UT) |
uint16_t | i2cReadReg_16 (int reg) |
mraa_result_t | i2cWriteReg (uint8_t reg, uint8_t value) |
uint8_t | i2cReadReg_8 (int reg) |
GY65 | ( | int | bus, |
int | devAddr, | ||
uint8_t | mode = BMP085_ULTRAHIGHRES |
||
) |
Instanciates a GY65 object
bus | number of used bus |
devAddr | address of used i2c device |
mode | BMP085 mode |
int32_t getPressure | ( | ) |
Return calculated pressure
int32_t getPressureRaw | ( | ) |
Get raw pressure data
int16_t getTemperatureRaw | ( | ) |
Get raw temperature data from chip
float getTemperature | ( | ) |
Return calculated temperature
int32_t getSealevelPressure | ( | float | altitudeMeters = 0 | ) |
With given absolute altitude sea level can be calculated
altitudeMeters | altitude |
float getAltitude | ( | float | sealevelPressure = 101325 | ) |
With given sea level altitude in meters can be calculated
sealevelPressure | Sea level |
int32_t computeB5 | ( | int32_t | UT | ) |
Calculation of B5 (check spec for more information)
UT |
uint16_t i2cReadReg_16 | ( | int | reg | ) |
Read two bytes register
reg | address of a register |
mraa_result_t i2cWriteReg | ( | uint8_t | reg, |
uint8_t | value | ||
) |
Write to one byte register
reg | address of a register |
value | byte to be written |
uint8_t i2cReadReg_8 | ( | int | reg | ) |
Read one byte register
reg | address of a register |