Environment Sensing - Ambient Light and UV Index GATT Service#

Provides ambient light and UV index sensor data in GATT characteristics. Designed for the Thunderboard smartphone app.

Functions#

void
sl_status_t
sl_gatt_service_light_get(float *lux, float *uvi)

Macros#

#define
SL_GATT_SERVICE_LIGHT_LUX_INVALID 0xFFFFFFFF
#define
SL_GATT_SERVICE_LIGHT_UVI_INVALID 0xFF

Function Documentation#

sl_gatt_service_light_on_event#

void sl_gatt_service_light_on_event (sl_bt_msg_t * evt)
Parameters
[in]evt

Event coming from the Bluetooth stack.

Bluetooth stack event handler.


Definition at line 45 of file common/gatt_service_light/sl_gatt_service_light.h

sl_gatt_service_light_get#

sl_status_t sl_gatt_service_light_get (float * lux, float * uvi)
Parameters
[out]lux

Ambient light illuminance (in lux).

[out]uvi

UV index.

Getter for Ambient Light and UV Index characteristic values. Returns

  • Status of the operation.

Note

  • To be implemented in user code.


Definition at line 54 of file common/gatt_service_light/sl_gatt_service_light.h