Hey all,
IM having trouble with my Taos TSL2550D light sensor conversion.
I am writing my own conversion, and trying to model it after the algorithm in
XSensorMTS400 (in xlisten there is no light conversion, that i can see).
THis is what im doing, because there are two channels, i need 2 variables of
each:
tch0 = data1;
int CC0 = ((int)tch0 & 0x7) >> 4;
int CC1 = (data2 & 0x7) >> 4;
int S0 = (int)tch0 & 0xF;
int S1 = data2 & 0xF;
int CV0 = (int)Math.pow(2.0,CC0);
int CV1 = (int)Math.pow(2.0,CC1);
float ACNT0 = (int)(16.5*(CV0-1)) + S0*CV0;
float ACNT1 = (int)(16.5*(CV1-1)) + S1*CV1;
float R = ACNT1 / ACNT0;
float lux = (float)(ACNT0 * 0.46 * Math.exp(-3.13*R));
return lux;
However, I am getting incorrect readings. Am i doing something wrong thank you.
Josh
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help