/Matrix

Web app - Control an LED matrix in real-time.

Primary LanguageJavaScriptMIT LicenseMIT

Matrix

Control an LED matrix in real-time.

Leverages the MQTT protocol using Mosca, MQTT.js, and Paho Python.

Matrix

View screenshots from Redditors here

Broken into 3 main applications:

  1. MQTT/UI Server
    • Single Node.js application with two main functions:
      1. Run a Mosca MQTT broker.
      2. Serve web pages using Express.
        • Each UI client subscribes to the Mosca broker.
    • Start with npm start.
      • Remember to npm install.
      • Requires a MongoDB instance.
      • NGINX is an optional dependency.
    • Commands:
      • View logs with pm2 logs matrix.
      • See online users with pm2 trigger matrix online.
      • Ban a user with pm2 trigger matrix ban <ip>.
      • Unban a user with pm2 trigger matrix unban <ip>.
  2. LED Client
    • Raspberry Pi client which subscribes to the Mosca broker.
    • Controls an 8x8 RGB LED matrix.
    • Start with sudo python app.py.
      • Requires Python 3.6 and dependencies in requirements.txt.
      • Run pip install -r requirements.txt to install dependencies.
  3. Stream Server
    • Streams live video of the LED matrix to the UI clients.
    • Runs on the same Raspberry Pi as the LED client.
    • Start with npm start.
      • Remember to npm install.

References