Thomas Buck před 1 rokem
rodič
revize
2e6b17969f
2 změnil soubory, kde provedl 21 přidání a 0 odebrání
  1. 8
    0
      README.md
  2. 13
    0
      tools/led.service

+ 8
- 0
README.md Zobrazit soubor

@@ -23,10 +23,18 @@ For debugging on your host PC you can use the TestGUI interface with pygame:
23 23
 
24 24
     pip install pygame
25 25
 
26
+## Setup
27
+
26 28
 The other currently supported option is using a Raspberry Pi with the [Adafruit RGB Matrix Bonnet](https://shop.pimoroni.com/products/adafruit-rgb-matrix-bonnet-for-raspberry-pi?variant=2257849155594) and a matching [LED Matrix](https://shop.pimoroni.com/products/rgb-led-matrix-panel?variant=35962488650).
27 29
 The [tutorial](https://learn.adafruit.com/adafruit-rgb-matrix-bonnet-for-raspberry-pi/driving-matrices) suggests using the [Adafruit Raspberry Pi Installer Script for the RGB matrix](https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/339cccfbdd8b503b53186176ff96bead9a13a2f5/rgb-matrix.sh).
28 30
 This will give you the [hzeller/rpi-rgb-led-matrix](https://github.com/hzeller/rpi-rgb-led-matrix) project which includes the Python bindings used in this project.
29 31
 
32
+Use the included systemd unit to auto-start the script on Raspberry Pi:
33
+
34
+    sudo cp tools/led.service /etc/systemd/system/led.service
35
+    sudo systemctl daemon-reload
36
+    sudo systemctl enable --now led.service
37
+
30 38
 ## Adding your own visualizations
31 39
 
32 40
 Take a look how others are implemented.

+ 13
- 0
tools/led.service Zobrazit soubor

@@ -0,0 +1,13 @@
1
+[Unit]
2
+Description=RGB LED Matrix
3
+After=multi-user.target
4
+
5
+[Service]
6
+Type=idle
7
+User=root
8
+ExecStart=/home/thomas/rgb-matrix-visualizer/livingroom.py
9
+Restart=always
10
+RestartSec=5
11
+
12
+[Install]
13
+WantedBy=multi-user.target

Loading…
Zrušit
Uložit