program to control the 7inch screen for raspberrypi
| src | update | |
| .gitignore | init | |
| Cargo.lock | update deps | |
| Cargo.toml | update deps | |
| COPYING | init | |
| README.md | rename to rpi-lcd | |
rpi-lcd
A Rust program for controlling power and brightness of the official Raspberry Pi 7" touch display.
It's similar to cli of rpi-backlight. It's noticeably faster than Python on Raspberry Pi.
Installation
$ cargo install --path .
Note: Create this udev rule to update permissions, otherwise you'll have to run rpi-lcd as root when changing the power or brightness:
$ echo 'SUBSYSTEM=="backlight",RUN+="/bin/chmod 666 /sys/class/backlight/%k/brightness /sys/class/backlight/%k/bl_power"' | sudo tee -a /etc/udev/rules.d/backlight-permissions.rules
Usage
$ rpi-lcd on
$ rpi-lcd bright # sets brightness to 255
$ rpi-lcd dim # sets brightness to 100
$ rpi-lcd dim 20 # sets brightness to 20
$ rpi-lcd off