This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rpi-backlight- Control Raspberry Pi 7" Screen Backlight with Asus TinkerBoard
Big Grin 
Hi all,
I have modified the Github Python Project "rpi-backlight" to work with the Asus Tinkerboard

A Python module for controlling power and brightness of the official Raspberry Pi 7" touch display.

Change the display brightness smoothly or abrupt
Set the display power on or off
Get the current brightness
Get the maximum brightness
Get the display power state (on/off)
Command line interface
Graphical user interface

A Raspberry Pi including a correctly assembled 7" touch display v1.1 or higher running a Linux-based OS
Python 2 or 3
gir1.2-gtk-3.0 for the GUI, install via sudo apt-get install gir1.2-gtk-3.0

Install from PyPI using:

clone this repository and install by:

git clone hxxp://
cd rpi-backlight
sudo python3 install


Example in a Python shell:

>>> import rpi_backlight as bl
>>> bl.set_brightness(255)
>>> bl.set_brightness(20, smooth=True, duration=3)
>>> bl.get_max_brightness()
>>> bl.get_actual_brightness()
>>> bl.get_power()
>>> bl.set_power(False)

NOTE: Code using set_ functions of this library has to be run as root, e.g. sudo python , if the permissions for changing the backlight were not changed as described in the installation section!

Open a terminal and run rpi-backlight as root:

$ rpi-backlight -b 255
$ rpi-backlight -b 20 -s -d 3
$ rpi-backlight --max-brightness
$ rpi-backlight --actual-brightness
$ rpi-backlight --power
$ rpi-backlight --off


Open a terminal and run rpi-backlight-gui as root.

Find it at:

Forum Jump:

Users browsing this thread: 1 Guest(s)