Read the statement by Michael Teeuw here.
Adjust brightness of the screen in the night
-
@Keromida You can easily use cron and tvservice to turn on/off at specific times…
tvservice -o turns off the display.
tvservice -p turns it back on.Just use cron (crontab -e) to schedule them…
-
Have you considered using a 50% transparent black DIV that is laying on top of everything?
The DIV has to be added to the DOM with absolute position, like this:
div.nightmode { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: Black; opacity: 0.5; }
-
@Cato this will prevent touchscreen ability for Those with Touch screen
I would go for a Filter like
body {
-webkit-filter: brigthness(50%);
} -
@strawberry-3.141 Yes, that seems like a much better idea! I tried to think simple, but it was not simple enough… :-)
-
@strawberry-3-141 That sound’s like a pretty good idea but now I have to connet that code to the time and that’s my actual problem. How could i integrate that? I would really like to use that option because that’s exactly what I want to use =)
@Cato Yeah, I was thinking the same but there was also my problem to write a code like that and then tell the code that it should just work between 10 PM and 6 AM (or better betweeen 22:00 and 6:00 for me in Germany) the time :(
@RedNax Yeah, these are the codes I know but there is still the problem to conect the code to the time :(
I’m really sorry when I’m not that good in programming like you all do but I started with VisualBasic just 3 months ago and I never programmed with anything else than VisualBasic :(
-
@Keromida The raspbian os is a linux derivative and includes cron which is used to schedule things.
You can tell it to do things through your crontab.When you log on to your pi issue the crontab -e command. The first time it will ask you which editor to use… chose the default if you’re not sure.
You’ll be greeted by something like this:
# # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command 00 23 * * * /usr/bin/tvservice -o 00 06 * * * /usr/bin/tvservice -p
You’ll have to add the two lines at the bottom which, in this example, will turn the mirror off at 2300 (11pm) and on again at 0600.
Save the file, and when asked yes you’re sure, and exit the editor… all done!