In this thread provides information about library for working with sensors for the C ++ programming language.
SIMPLE TEST FILE FOR MY LITTLE LIBRARY:
#include <iostream>
#include <TSL2561.h>
#include <TSL2561.c>
using namespace std;
int main () {
float cur_illum, low_bow_illum;
cur_illum = tsl2561_getdata(TSL2561_TOTAL_LUX);
cout << "CURRENT TOTAL LIGHTING (LUX): " << cur_illum << endl;
cout << "CURRENT VISIBLE LIGHTNING (LUX): " << tsl2561_getdata(TSL2561_VISIBLE_LUX) << endl;
cout << "CURRNET INFRARED LIGHTNING (LUX):" << tsl2561_getdata(TSL2561_INFRARED_LUX) << endl;
return 0;
}
SIMPLE TEST FILE FOR MY LITTLE LIBRARY:
#include <iostream>
#include <TSL2561.h>
#include <TSL2561.c>
using namespace std;
int main () {
float cur_illum, low_bow_illum;
cur_illum = tsl2561_getdata(TSL2561_TOTAL_LUX);
cout << "CURRENT TOTAL LIGHTING (LUX): " << cur_illum << endl;
cout << "CURRENT VISIBLE LIGHTNING (LUX): " << tsl2561_getdata(TSL2561_VISIBLE_LUX) << endl;
cout << "CURRNET INFRARED LIGHTNING (LUX):" << tsl2561_getdata(TSL2561_INFRARED_LUX) << endl;
return 0;
}