- Idea: gonnabuysomewindows
- Matrix driver: hzeller/rpi-rgb-led-matrix
- Hardware: adafruit
git clone https://github.com/hzeller/rpi-rgb-led-matrix.git
cd rpi-rgb-led-matrix/utils && make led-image-viewer
cd .. && git clone https://github.com/maxfer1221/python-rgb-matrix
cd python-rgb-matrix && pip3 install -r requirements.txt
I've included an init.sh
script which sets up environment variabels and executes the python script to display the album covers. To use it, simply change the {keys}
inside init.sh
.
Alternatively, export KEY_NAME=KEY_VAL
each key inside of init.sh
and sudo -E python3 ./test.py
.
Other LED matrix parameters can be changed from within the python script.
Create a systemd (or equivalent) service that executes the script on startup/some event.
ex:
[Unit]
Description=Script service to run on wifi connection
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi
ExecStart=/home/pi/.onWiFi.sh
[Install]
WantedBy=multi-user.target
.onWiFi.sh:
#!/bin/bash
cd /path/to/init.sh
sudo sh init.sh
Then enable the service:
sudo systemctl enable myservice.service
# or: sudo systemctl start myservice.service
Add the lines inside .bashrc
into your ~/.bashrc
to automatically start the led display on startup.