Giter Site home page Giter Site logo

ledcat's Introduction

ledcat

Build Status

Ledcat is simple utility that aims to provide a standard interface for driving LED-strips and such.

Simply create a program that outputs 3 bytes of RGB for each pixel in your strip.

Documentation

Install

The easiest way to install Ledcat is to download a binary from Github.

Note: Hzeller's LED Matrix driver is not available from CI builds.

Installing from Cargo

Install the Rust Language if you have not already.

Then, you can install ledcat directly using Cargo.

cargo install ledcat

Building Manually

Alternatively, you can build and install Ledcat manually:

git clone https://github.com/polyfloyd/ledcat.git
cd ledcat
cargo build --release
cp target/release/ledcat /usr/local/bin/ledcat

Usage Examples

# Make a strip of 30 apa102 leds all red.
perl -e 'print "\xff\x00\x00" x 30' | ledcat --geometry 30 apa102 > /dev/spidev0.0
# Receive frames over UDP.
nc -ul 1337 | ledcat --geometry 30 apa102 > /dev/spidev0.0
# Load an image named "image.png", resize it to fit the size of the display and
# send it to a ledstrip zigzagged over the Y-axis.
convert image.png -resize 75x8! -depth 8 RGB:- | \
    ledcat --geometry 75x8 --transpose zigzag_y apa102 > /dev/spidev0.0
# A clock on a zigzagged two dimensional display of 75x8 pixels
while true; do
    convert -background black -fill cyan -font Courier -pointsize 8 \
        -size 75x8 -gravity center -depth 8 caption:"$(date +%T)" RGB:-
    sleep 1;
done | ledcat --geometry 75x16 --transpose zigzag_y apa102 > /dev/spidev0.0;
# Show random noise as ambient lighting or priority messages if there are any.
mkfifo /tmp/ambient
mkfifo /tmp/messages
cat /dev/urandom > /tmp/ambient &
./my_messages > /tmp/messages &
ledcat --input /tmp/ambient /tmp/messages --linger --geometry 30 apa102 > /dev/spidev0.0

Supported Drivers:

  • Linux spidev
  • Serial
  • Artnet DMX

Supported Device Types:

ledcat's People

Contributors

polyfloyd avatar raboof avatar ben-alderson avatar

Watchers

James Cloos avatar  avatar

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.