androidthings / contrib-drivers

Open source peripheral drivers
Apache License 2.0
558 stars 174 forks source link

Support for backlight display control #54

Closed knobtviker closed 7 years ago

knobtviker commented 7 years ago

Please add support for backlight control on Raspberry Pi 3. My setup is 0.4-devpreview and official 7 inch display. At the moment backlight is at maximum and there is no way of setting any value or control whatsoever. Common intents like System.Setting are not supported.

On Raspbian I used these to turn on

echo 0 > /sys/class/backlight/rpi_backlight/bl_power

and to turn it off:

echo 1 > /sys/class/backlight/rpi_backlight/bl_power

And brightness can be adjusted using:

echo n > /sys/class/backlight/rpi_backlight/brightness

where n is some value between 0 and 255.

These are not in Android Things or am I not seeing some other way of display backlight control on official display?

jdkoren commented 7 years ago

It sounds like you are asking for a system-level control/API for adjusting display brightness. This repository is for libraries intended to be included in 3rd-party app code, so nothing here has any impact on OS-level features. Such features should be requested using the public issue tracker for Android, with "Things" as the component; you can do that here.