Driver for the Silicon Labs Si1133 Visible Light/UV sensor

Dependents:   TBSense2_Sensor_Demo mbed-BLE-coragem-teste mbed-BLE-coragem-teste mbed-lorawan-coragem ... more

Sample library for use with the Silicon Labs Si1133 sensor for visible light intensity (lux) and UV index measurements.



#include "mbed.h"
#include "Si1133.h"
//Create an Si1133 object
Si1133 sensor(PC4, PC5);
int main()
    //Try to open the Si1133
    if ( {
        printf("Device detected!\n");
        while (1) {
            //Print the current light level
            printf("Lux = %.3f\n", (float)sensor.get_light_level());
            //Print the current UV index
            printf("UV index = %.3f\n", (float)sensor.get_uv_index());
            //Sleep for 0.5 seconds
    } else {
        error("Device not detected!\n");
Download repository: zip gz

Files at revision 3:f780ca9105bb

Name Size Actions
Si1133.cpp 26762 Revisions Annotate
Si1133.h 15842 Revisions Annotate