Friendlyx
Posts: 2
Joined: Fri Mar 16, 2018 7:29 am

Automatic Brightness? DIY Wall Display Project!

Sat Mar 17, 2018 3:39 am

Hey everyone! I decided to do the DIY Wall Display Project i found here,

https://www.cnet.com/how-to/turn-an-old ... pberry-pi/

Which i did with the smaller 7 inch screen for my bedroom, everything is working great, and i love it! However, i want to know how i can make it lower brightness at night? It's quiet bright when i'm trying to go to sleep, so if there is someway i could work this? I'd appreciate it! Thanks in advanced!

User avatar
DougieLawson
Posts: 33048
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Automatic Brightness? DIY Wall Display Project!

Sat Mar 17, 2018 8:42 am

If it's a Official Raspberry Pi Foundation 7" display you need the v1.2 model, then you can set brightness, you can read actual_brightness.

Code: Select all

[email protected]:/sys/devices/platform/rpi_backlight/backlight/rpi_backlight # ls -ls
total 0
0 -r--r--r-- 1 root root 4096 Mar 17 08:34 actual_brightness
0 -rw-r--r-- 1 root root 4096 Mar 17 08:34 bl_power
0 -rw-r--r-- 1 root root 4096 Mar 15 15:03 brightness
0 lrwxrwxrwx 1 root root    0 Mar 17 08:34 device -> ../../../rpi_backlight
0 -r--r--r-- 1 root root 4096 Mar 15 15:03 max_brightness
0 drwxr-xr-x 2 root root    0 Mar 17 08:33 power
0 lrwxrwxrwx 1 root root    0 Mar 15 15:03 subsystem -> ../../../../../class/backlight
0 -r--r--r-- 1 root root 4096 Mar 15 15:03 type
0 -rw-r--r-- 1 root root 4096 Mar 15 15:03 uevent
[email protected]:/sys/devices/platform/rpi_backlight/backlight/rpi_backlight #
sudo sh -c "echo 255 > /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness"
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

hengy
Posts: 5
Joined: Sat Apr 05, 2014 3:30 pm

Re: Automatic Brightness? DIY Wall Display Project!

Tue Apr 10, 2018 3:13 am

I’d be interested in the same thing but I’d rather it was based on the current room brightness. I could add a sensor to detect light and then have a script that adjusts brightness based on that light.

henr2011
Posts: 1
Joined: Wed May 02, 2018 4:39 am

Re: Automatic Brightness? DIY Wall Display Project!

Sun May 06, 2018 3:18 am

I have a v1.0 and I have tried 2 programs off git and can verify dimming doesn't work, it goes to 40% without change then blank. Is there a firmware upgrade I can apply to v1.0 card that will make this work?

User avatar
CarlRJ
Posts: 599
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: Automatic Brightness? DIY Wall Display Project!

Wed May 16, 2018 4:31 pm

The v1.0 display can't do brightness, except in binary form (backlight on or off).

In my living room I have one Pi that has an Adafruit TSL2561 Light Sensor (pointing out the side of a translucent case), and a Python script that takes a lux reading every 15 seconds and posts that reading to an in-house MQTT broker. Several different Pi's then subscribe to this MQTT data, and run Python scripts that use the data to adjust their screen brightness every 15 seconds. It's been running well for perhaps a year and a half. I'll try to get the code up to Github soon, but, in general, yes, this kind of thing can work well.

Return to “Official Foundation Display”

Who is online

Users browsing this forum: No registered users and 1 guest