Lightweight HTTP server in Python, configured to receive text data via GET/POST and displaying it on a MAX7219 compatible scrolling LED display connected to a Raspberry Pi.
Dependencies: https://github.com/rm-hull/luma.led_matrix
http://raspberrypi.local:8181/?led=1&msg=Hello World!
curl -d 'Hello World!' raspberrypi.local:8181/led
-
First, install the Luma LED display drivers. Follow the installation instructions provided here: https://github.com/rm-hull/luma.led_matrix
-
Create a new directory in your home folder on the Raspberry Pi, and copy ledAlert.py to it.
mkdir ~/ledAlert
- Configure it to run as a service on startup (Feel free to use any text editor of your choice):
cd /lib/systemd/system/
sudo pico ledAlert.service
[Unit]
Description=LED Alert
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python /home/YourUsername/ledAlert.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Important: Change "YourUsername" (line 7 above) to your actual logon user name (e.g. "/home/pi/ledAlert.py")
sudo chmod 644 /lib/systemd/system/ledAlert.service
chmod +x /home/YourUsername/ledAlert.py
sudo systemctl daemon-reload
sudo systemctl enable ledAlert.service
sudo systemctl start ledAlert.service
To check the status of the ledAlert service (or any other system service, for that matter):
sudo systemctl status ledAlert.service
4.sudo reboot now