RUI3 (RAK Unified Interface 3) - RAK4631
rak1902

Public Member Functions

 rak1902 ()
 
uint8_t readReg (LPS22HB_Reg_TypeDef reg)
 
void writeReg (LPS22HB_Reg_TypeDef reg, uint8_t val)
 
bool init (void)
 
float pressure (LPS22HB_Pressure_Unit unit)
 
float pressure (void)
 

Data Fields

float reading
 

Constructor & Destructor Documentation

◆ rak1902()

rak1902 ( )

Member Function Documentation

◆ readReg()

uint8_t readReg ( LPS22HB_Reg_TypeDef  reg)

◆ writeReg()

void writeReg ( LPS22HB_Reg_TypeDef  reg,
uint8_t  val 
)

◆ init()

bool init ( void  )
Description
This function enabled the RAK1902 sensor and puts the device into standby mode / sleep mode for lowest power consumption
Syntax
sensor.lps22hb.init()
Returns
bool True if successfully query and identify RAK1902 module. FALSE if RAK1902 init failed

◆ pressure() [1/2]

float pressure ( LPS22HB_Pressure_Unit  unit)
Description
This function will query the RAK1902 to update the Pressures values. RAK1902 will go back to power saving mode after the query
Syntax
sensor.lps22hb.pressure()
sensor.lps22hb.pressure(unit)
Parameters
unitthe unit which you want to recieve for pressure(PSI,MILLIBAR,KILOPASCAL)
Returns
float the pressure detected form RAK1902 sensor

◆ pressure() [2/2]

float pressure ( void  )

Field Documentation

◆ reading

float reading