by Sebastian Norr
Version 2 (October 7, 2016)
Download (88 downloads)
(10 blocks +1 debug)
NEW VERSION:
http://llamalab.com/automate/community/flows/7432
This flow should be battery friendly, it adjusts the screen brightness by following a logarithmic curve between:
From [ X=0 lx, Y=0 % ]
To [ X=30 000 lx, Y=100 % ]
Where X is input as the light intensity from the light sensor,
(30 000 lx is maximum on my phone).
And Y is output as the screen brightness in percentage.
The formula:
100 * log(lux + 1)
------------------------------- = Bright %
log(30000)
X = lux.
Y = Bright.
The +1 prevents [Y= -infinity] when [X = 0]
I would like the formula to rise a little slower in the beginning but don't know how/where to modify the formula.
Change log:
2016-09-26
* Prevented the: Scan, variable from overflowing... in case you would run this flow for more than 1021 years ;P
(at current speed)
* Changed the time out to inexact delay & removed keep awake (should not have been on at all) to extend battery life further.
Search Tag: [SN]
5 stars | 1 | |
4 stars | 1 | |
3 stars | 0 | |
2 stars | 0 | |
1 star | 0 | |
Reports | 0 |
Rate and review within the app in the Community section.