RUI3 (RAK Unified Interface 3) - RAK4631
rak1904

Public Member Functions

bool init (void)
 
bool update (void)
 
float x (void)
 
float y (void)
 
float z (void)
 
 rak1904 (uint8_t busType=I2C_MODE, uint8_t inputArg=0x18)
 
- Public Member Functions inherited from rak1904Core
 rak1904Core (uint8_t)
 
 rak1904Core (uint8_t, uint8_t)
 
 ~rak1904Core ()=default
 
uint8_t getAddress ()
 
RAK1904_status beginCore (void)
 
RAK1904_status readRegisterRegion (uint8_t *, uint8_t, uint8_t)
 
RAK1904_status readRegister (uint8_t *, uint8_t)
 
RAK1904_status readRegisterInt16 (int16_t *, uint8_t offset)
 
RAK1904_status writeRegister (uint8_t, uint8_t)
 

Constructor & Destructor Documentation

◆ rak1904()

rak1904 ( uint8_t  busType = I2C_MODE,
uint8_t  inputArg = 0x18 
)

Member Function Documentation

◆ init()

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

◆ update()

bool update ( void  )
Description
This function will trigger the RAK1904 to update the X,Y,Z values, after the values are updated the RAK1904 will go back to power saving mode
Syntax
sensor.lis3dh.update()
Returns
bool True if values updated successfully. FALSE if update failed

◆ x()

float x ( void  )
Description
This function will trigger the RAK1904 to return the latest X Axis value
Note
the function return from -2 to 2
Syntax
sensor.lis3dh.x()
Returns
float

◆ y()

float y ( void  )
Description
This function will trigger the RAK1904 to return the latest Y Axis value
Note
the function return from -2 to 2
Syntax
sensor.lis3dh.y()
Returns
float

◆ z()

float z ( void  )
Description
This function will trigger the RAK1904 to return the latest Z Axis value
Note
the function return from -2 to 2
Syntax
sensor.lis3dh.z()
Returns
float