by Jim Davies
This script adjusts the brightness of the screen when it's awake based on user defined thresholds. The variable luxMap contains a map of lux levels to desired brightness. When the screen is awake for prolonged periods of time it will adjust the brightness smoothly based on the changes in ambient light. I designed this to keep the screen brightness at a sane but useful level when driving. It's based loosely on multiple other community brightness scripts.