Skip to content

Raspberry specific steps

Lajos Santa edited this page Feb 3, 2021 · 10 revisions

For controlling the backlight from the app

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

Read CPU temp

usermod -a www-data -G gpio

Start the app on start

file: /home/pi/.config/lxsession/LXDE-pi/autostart

content:

@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --kiosk --app=http://localhost:9000/rpi-kiosk

Auto backlight

  • create systemd service file /etc/systemd/system/buck-auto-backlight.service with this content:
[Unit]
Description=Buck RPi auto backlight service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=www-data
Environment=BUCK_CONFIG_FILE=/etc/buck.yaml
ExecStart=/var/www/buck/bin/auto-rpi-backlight

[Install]
WantedBy=multi-user.target
  • automatically get it to start on boot systemctl enable buck-auto-backlight
  • usermod -a www-data -G i2c
  • systemctl start buck-auto-backlight

Clone this wiki locally