Skip to content

A tool for streaming frames to rpi-rgb-led-matrix over ZeroMQ.

License

Notifications You must be signed in to change notification settings

Knifa/led-matrix-zmq-server

Repository files navigation

led-matrix-zmq-server

Build Status

A tool for streaming frames to rpi-rgb-led-matrix over ZeroMQ.

Available as a Docker image at knifa/led-matrix-zmq-server.

Building

In addition to rpi-rgb-led-matrix, requires czmq.

Usage

You can run the image with e.g., the following command. Mostly, you MUST pass --privileged as access to /dev/mem is required.

docker run \
  --privileged \
  --rm \
  knifa/led-matrix-zmq-server \
    --led-brightness=50 \
    --led-cols=64 \
    --led-slowdown-gpio=2 \
    --led-pwm-lsb-nanoseconds=50 \
    --led-rows=32 \
    --zmq-endpoint=tcp://*:1337

The following server arguments are available:

  • --zmq-endpoint: The ZMQ endpoint to listen on. Default is tcp://*:42024.
  • --bytes-per-pixel: Number of bytes per pixel. Default is 3 (i.e., 24BPP)

The remaining matrix arguments are passed directly to rpi-rgb-led-matrix. Check out their README for details.

Sending Frames

The server is a simple ZMQ REQ-REP loop. All you need to do is send your frame as a big ol' byte chunk then wait for an empty message back.

Each frame should be in a BGR24 (or however large you passed into --bytes-per-pixel) format, with exact size depending on your matrix setup (i.e., whatever rpi-rgb-led-matrix says your final canvas size is.)

License

GNU GPL v3. See LICENSE.