Page 1 of 1

Light sensor

Posted: 08 Mar 2013 14:31
by giovag7
Hi Martin,
i noticed that trigger "light sensor" give variable light_level only when there is a transition above or below selected threshold.
But if i need to know light level at any time, how can i do this?
I think would be better to have a component that can give light level at any moment.

http://automagic4android.com/en/help/co ... ght_sensor

Regards

Re: Light sensor

Posted: 08 Mar 2013 14:51
by Martin
Perhaps you could create two triggers, one that triggers when the sensor is above a certain value and one that triggers when the value falls below this value and store the result in a global variable. But this will keep the sensor awake all the time and is not optimal for battery consumption.
I have to check if the light sensor allows to query the current value to create a condition.

Re: Light sensor

Posted: 08 Mar 2013 15:09
by giovag7
Martin wrote:Perhaps you could create two triggers, one that triggers when the sensor is above a certain value and one that triggers when the value falls below this value and store the result in a global variable. But this will keep the sensor awake all the time and is not optimal for battery consumption.
I have to check if the light sensor allows to query the current value to create a condition.
Thank you,
no i don't want to keep sensor allway on.
If is possible to obtain light sensor value at any moment this would be the best solution.