2016-09-09 19:19:35 -07:00
|
|
|
//Modified: Abhishek Malik <abhishek.malik@intel.com>
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "tsl2561.h"
|
|
|
|
|
2016-09-19 15:45:22 -07:00
|
|
|
#include "upm_utilities.h"
|
|
|
|
|
2016-09-10 13:29:34 -07:00
|
|
|
int main()
|
2016-09-09 19:19:35 -07:00
|
|
|
{
|
2016-09-19 15:45:22 -07:00
|
|
|
tsl2561_context dev = tsl2561_init(0, TSL2561_Address, GAIN_0X, INTEGRATION_TIME1_101MS);
|
|
|
|
float abc = 0;
|
|
|
|
if(tsl2561_get_lux(dev, &abc) != UPM_SUCCESS){
|
|
|
|
printf("ERROR !! ERROR !! ERROR!!");
|
|
|
|
}
|
|
|
|
printf("value retrieved: %f\n", abc);
|
2016-09-09 19:19:35 -07:00
|
|
|
|
2016-09-19 15:45:22 -07:00
|
|
|
return 0;
|
2016-09-09 19:19:35 -07:00
|
|
|
}
|