Monday, February 4, 2008

The update of sensor

What is sensor? It was a program to change backlight brightness by reading the light sensor from E2. The light sensor was placed in (or near?) the camera anyway. I have made an update for this with more options to choose. Such as mode and speed. You can download it here.

How the sensor works? The sensor read the value from light_sensor then calculate it and change the backlight. In my update, it will read and calculate then compare the situation with the last. If the change of light condition not significant, it will avoid changing backlight and repeat read-calculate-compare again until five times (if the light stable) and reset the backlight. Btw it was the explanation of stable mode.

Another update is the ability to change speed or actually the delay between read-calculate phrase, to low, medium or fast. The low will have delay for 5 seconds, medium for 3 seconds or fast for a second. I'm not sure but I believe we can save more battery with lower speed.

So here is available flags for calling sensor:
-n >>> normal mode
-s >>> stable mode
-l >>> low speed
-m >>> medium speed
-f >>> fast speed
-h >>> show helps
For example:
sensor -f -n >>> run in fast and normal mode
sensor -sl >>> run in stable mode and low speed
The default is stable mode and medium speed (if no flags specified).

Btw normal mode will not do comparing. Enjoy!

No comments: