BM1383AGLV sensor library
Dependents: simple-sensor-client rohm-SensorShield-example
BM1383AGLV Class Reference
BM1383AGLV pressure sensor example. More...
#include <BM1383AGLV.h>
Public Member Functions | |
BM1383AGLV (PinName sda, PinName scl, int addr=BM1383AGLV_DEFAULT_SLAVE_ADDRESS) | |
BM1383AGLV constructor. | |
BM1383AGLV (I2C &i2c_obj, int addr=BM1383AGLV_DEFAULT_SLAVE_ADDRESS) | |
Create a BM1383AGLV instance which is connected to specified I2C pins with specified address. | |
~BM1383AGLV () | |
BM1383AGLV destructor. | |
void | initialize (void) |
Initializa BM1383AGLV sensor. | |
float | getPressure () |
Get pressure. | |
float | getTemperature () |
Get temerature. |
Detailed Description
BM1383AGLV pressure sensor example.
BM1383AGLV sensor(I2C_SDA, I2C_SCL); Serial pc(USBTX, USBRX); int main() { pc.printf("\nBM1383AGLV Pressure sensor library test program.\n"); while(1) { pc.printf("pressure=%7.2f, temperature=%5.3f\n", sensor.getPressure(), sensor.getTemperature()); wait(0.5); } }
Definition at line 76 of file BM1383AGLV.h.
Constructor & Destructor Documentation
BM1383AGLV | ( | PinName | sda, |
PinName | scl, | ||
int | addr = BM1383AGLV_DEFAULT_SLAVE_ADDRESS |
||
) |
BM1383AGLV constructor.
- Parameters:
-
sda SDA pin sdl SCL pin addr slave address of the I2C peripheral (default: 0xBA)
Definition at line 33 of file BM1383AGLV.cpp.
BM1383AGLV | ( | I2C & | i2c_obj, |
int | addr = BM1383AGLV_DEFAULT_SLAVE_ADDRESS |
||
) |
Create a BM1383AGLV instance which is connected to specified I2C pins with specified address.
- Parameters:
-
i2c_obj I2C object (instance) addr slave address of the I2C-bus peripheral (default: 0xBA)
Definition at line 42 of file BM1383AGLV.cpp.
~BM1383AGLV | ( | ) |
BM1383AGLV destructor.
Definition at line 51 of file BM1383AGLV.cpp.
Member Function Documentation
float getPressure | ( | ) |
float getTemperature | ( | ) |
void initialize | ( | void | ) |
Initializa BM1383AGLV sensor.
Configure sensor setting
Definition at line 57 of file BM1383AGLV.cpp.
Generated on Tue Jul 12 2022 18:57:04 by 1.7.2