Calibrate light sensor?

204 views
Skip to first unread message

iphone2n1

unread,
Oct 29, 2010, 11:00:30 PM10/29/10
to Tasker
I am trying to use the light sensor for some night time driving and
the popup help says I should calibrate the light sensor by covering it
up and then exposing it to some bright light.

I am afraid, I'm a bit lost. When do I do this and how do I know that
it has been calibrated. Also the %LIGHT variable seems to come back
with numbers in Lux per the manual so, I am not sure how to get it in
the 0-100 range as suggested by the context.

I would appreciate any help in getting this sorted out.

WPWoodJr

unread,
Oct 29, 2010, 11:09:48 PM10/29/10
to Tasker
You only need to calibrate once.

The 0-100 context range is a % brightness and is calculated from the
%LIGHT variable so that the minimum value of %LIGHT corresponds to 0%
and the max value is 100% with other values spread fairly evenly
between.

iphone2n1

unread,
Oct 30, 2010, 11:37:24 AM10/30/10
to Tasker
Ah, but how, and when, does the calibration take place? I'm sorry if
I'm appearing a bit dim here, but I'm just not getting it from reading
the documentation.

I set up a profile with the light sensor. I covered the sensor up with
my hand for about 5 seconds and then stepped out into the sunlight for
about 5 seconds. However, when I do a popup to tell me the light
value, I am still getting values in excess of 100 displayed.

Pent

unread,
Oct 30, 2010, 11:57:17 AM10/30/10
to Tasker
> I set up a profile with the light sensor. I covered the sensor up with
> my hand for about 5 seconds and then stepped out into the sunlight for
> about 5 seconds. However, when I do a popup to tell me the light
> value, I am still getting values in excess of 100 displayed.

%LIGHT is the lux value for people who want fine control.

The state works with percentages (of the lux levels it sees as you use
it),
so people can configure the state without having to know what the
values
coming from the sensor are. Or what a lux is.

Pent

iphone2n1

unread,
Oct 31, 2010, 9:56:43 PM10/31/10
to Tasker
So we don't have access to the value the context uses? I only saw the
%LIGHT variable in the documentation.

WPWoodJr

unread,
Oct 31, 2010, 10:27:12 PM10/31/10
to Tasker
Correct. You can calculate the context value as:

(log(%LIGHT)-log(min %LIGHT reading))/(log(max %LIGHT reading)-
log(min %LIGHT reading))*100
Reply all
Reply to author
Forward
0 new messages