Giter VIP home page Giter VIP logo

ledalert's Introduction

LED Alert

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

Usage

HTTP/GET (Web browser):

http://raspberrypi.local:8181/?led=1&msg=Hello World!

HTTP/POST (CURL)

curl -d 'Hello World!' raspberrypi.local:8181/led

Installation

  1. First, install the Luma LED display drivers. Follow the installation instructions provided here: https://github.com/rm-hull/luma.led_matrix

  2. Create a new directory in your home folder on the Raspberry Pi, and copy ledAlert.py to it.

mkdir ~/ledAlert
  1. 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

Paste or write the following into "ledAlert.service" (the blank file that you just created):

[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

Change the user name reference in line 2 (above) as well

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

1337 services awaits

4.sudo reboot now

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.