2018-10-31, 08:40 PM
(2018-10-31, 05:00 PM)NaturalBornCamper Wrote: Hey there,
Controlling the backlight of the official raspberry pi screen is ready enough on raspbian, but it looks like it's different on openplotter.
The file and folder to use in the link do not even exist and you don't have write permission:
https://raspberrypi.stackexchange.com/qu...en-display
Same with the python code.
Anybody figured it out?
Hi,
controlling the backlight is very easy:
https://github.com/linusg/rpi-backlight
Open Terminal, type:
sudo nano /etc/udev/rules.d/backlight-permissions.rules
Add this to make access permanent:
SUBSYSTEM=="backlight",RUN+="/bin/chmod 666 /sys/class/backlight/%k/brightness /sys/class/backlight/%k/bl_power"
Install backlight-lib:
sudo pip install rpi_backlight
From now you can run 'sudo rpi-backlight' and it will ask for the brighness.
Or 'sudo rpi-backlight-gui' to get a graphical slider.
I am using an IR remote control and have changed the key-binding to call
the rpi-backlight-gui. Works very nice!
Type:
sudo nano ~/.config/openbox/lxde-pi-rc.xml
Insert after <!--keybindings for LXPanel -->:
<keybind key="your keyboard key here">
<action name="Execute">
<command>sudo ripi-backlight-gui</command>
</action>
</keybind>
To find out the Scancodes of your keyboard/RC, type:
xev
Use strg+c to quit xev.
Cheers,
Chris