1
0
Fork
You've already forked rpi_lcd
0
program to control the 7inch screen for raspberrypi
  • Rust 100%
Find a file
2025年02月20日 22:17:02 +01:00
src update 2024年03月01日 10:57:13 +01:00
.gitignore init 2023年09月07日 18:51:27 +02:00
Cargo.lock update deps 2025年02月20日 22:17:02 +01:00
Cargo.toml update deps 2025年02月20日 22:17:02 +01:00
COPYING init 2023年09月07日 18:51:27 +02:00
README.md rename to rpi-lcd 2024年07月05日 21:21:01 +02:00

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