Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (38 sloc) 1.63 KB

Backlight Controls

The CLI script gives you a minimal interface to control the Official Raspberry Pi Touch 7" brightness. Feel free to send a Pull Request if you wish to improve this little tool. Enjoy!

Change Permissions

To change the brightness, you first need to enable writing access.

sudo chown root.pi /sys/class/backlight/rpi_backlight/brightness
sudo chmod 0664 /sys/class/backlight/rpi_backlight/brightness

Install CLI

The CLI script requires requires npm to be installed, to install Node Package Manager, see instructions here.

git clone https://github.com/hundredrabbits/backlight-control.git
cd backlight-control/
sudo npm install
sudo npm start

Controls

  • arrowRight +10/255
  • arrowLeft -10/255
  • } +255/255
  • { +255/255
  • ] +1/255
  • [ -1/255

Install GUI

The GUI script requires PySide to be installed, install it with sudo pip install pyside.

git clone https://github.com/hundredrabbits/backlight-control.git
cd backlight-control/
sudo python /home/pi/Tools/backlight-control/main.py &

To launch the script on boot, edit /home/pi/.config/lxsession/LXDE-pi/autostart and add this line at the bottom:

@sudo python /home/pi/Tools/backlight-control/main.py &

Controls

  • Click, to toggle between 40% and 100% brightness.