#include <sys/types.h>
Functions | |
short | tsl_calculate_lux (u_char channel0, u_char channel1) |
u_char | tsl_init (void) |
u_char | tsl_read (u_char *channel0, u_char *channel1) |
Converts channel values from both sensors to an approximated value in lux.
This is a simplified lux equation approximation using lookup tables. see http://www.taosinc.com/downloads/pdf/dn9b_tsl2550_Lux_Calculation.pdf
channel0 | ||
channel1 |
u_char tsl_init | ( | void | ) |
Initialise the light sensor.
TwInit() has to be called before.
Read sampled sensor data.
After this call, the sensor needs 800ms integration time, before the next values can be read.
channel0 | (all light) | |
channel1 | (IR-light only) |