RUI3 (RAK Unified Interface 3) - RAK4631
rak1903

Public Member Functions

 rak1903 ()
 
RAK1903_ErrorCode writeConfig (RAK1903_Config)
 
bool init (void)
 
bool update (void)
 
float lux (void)
 

Data Fields

uint16_t ID
 

Constructor & Destructor Documentation

◆ rak1903()

rak1903 ( )

Member Function Documentation

◆ writeConfig()

RAK1903_ErrorCode writeConfig ( RAK1903_Config  )

◆ init()

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

◆ update()

bool update ( void  )
Description
This function will trigger the RAK1903 to update the LUX values, after the values are updated theRAK1903 will go back to power saving mode
Syntax
sensor.opt3001.update()
Returns
bool True if values updated successfully. FALSE if update failed

◆ lux()

float lux ( void  )
Description
This function will trigger the RAK1903 to return the latest LUX value
Note
the lux return range from 0 to 83865
Syntax
sensor.opt3001.lux()
Returns
float (unit: lux)

Field Documentation

◆ ID

uint16_t ID