Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting screen brightness (via PWM) #1124

Closed
haplm opened this issue Oct 24, 2020 · 1 comment
Closed

Add support for setting screen brightness (via PWM) #1124

haplm opened this issue Oct 24, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@haplm
Copy link

haplm commented Oct 24, 2020

Is your feature request related to a problem? Please describe.
I have a Waveshare 4.3 DSI display attached to my Pi:
https://www.waveshare.com/wiki/4.3inch_DSI_LCD

The only way how to control the brightness of that thing is to connect a pad on it with one of the GPIO pins, and send it PWM signal. Right now I'm using gpio utility to control it either manually from shell (really clunky), or twice a day with cron (off during the night).

Init sequence looks like this:

gpio -g pwm 18 0 
gpio -g mode 18 pwm 
gpio pwmc 1000 
gpio -g pwm 18 X(X is in range 0~1024, 0: Darkest, 1024: brightest)

And then it is enough to repeat
gpio -g pwm 18 X(X is in range 0~1024, 0: Darkest, 1024: brightest)

Describe the solution you'd like
It would be great to have brightness control directly in OctoDash, or at least OctoDash could turn off the backlight when the screen goes to sleep (by issuing gpio -g pwm 18 0), and turn it back on when the screen is waking up (by issuing gpio -g pwm 18 X, where X is a preset value).

Additional context
Following link shows how this can be achieved with pigpio:
http://comfilewiki.co.kr/en/doku.php?id=comfilepi:controlling_the_lcd_backlight:index

Thanks!

@haplm haplm added the enhancement New feature or request label Oct 24, 2020
@UnchartedBull
Copy link
Owner

will be tracked in #410 (see latest comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants