08-24-2021, 10:13 PM
(08-24-2021, 08:37 AM)765GHF Wrote: Just an update on this script.
I found that in practice that the script was too reactive to temporary ambient light changes (e.g. shade, trees etc.) and quite distracting when driving. Rather than putting more work into the script fine tuning / troubleshooting I decided to use the script below (which uses the average light reading based on 10 separate readings and also increases / descreases brightness level more slowly).
Updated script using average light value (taken from this forum post - https://bluewavestudio.io/community/show...p?tid=2398 by grawa
The script has the same functionality as the original in that it both changes brightness level and switches day / night mode for OAP & AA using GPIO.
To date I have found that the brightness levels change far less often, day / night mode also continues to change correctly. There is one minor problem which I have yet to look at - under lower light circumstances the screen will go black for one cycle of the script (i.e. for a couple of seconds). I will put some debugging in and take a look at this.
Any idea why this 'os.system('sudo date -s "01 JAN 2000 00:00:00"')' is set in that script?