Backlight controls for the Raspberry Pi Touch 7"
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
CODE_OF_CONDUCT.md
LICENSE
PREVIEW_CLI.jpg
PREVIEW_GUI.png
README.md
backlight.txt
icon.day.png
icon.night.png
main.js
main.py
package.json

README.md

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.