Git Product home page Git Product logo

beacon's Introduction

Beacon: a language for generating patterns for an LED strip

This is a toy that I banged together in Rust. It generates ripply color patterns that you could use to control a strip of individually-addressable LEDs.

There is no code to interface with an LED strip. For that, you need a different project. I suspect you should start with this one, but I haven't really dug into it yet.

All this project does is write RGB values into an array of floats, and then display them as a strip of colors in a window (using SDL2). The point is that the colors are controlled by a script, and it's very easy to write and iterate scripts. See the scripts directory for examples.

Try it out

cargo run scripts/bustle.pab

Or try one of the other scripts. I'm fond of clouds.pab and portal.pab.

By default this simulates a strip of 160 LEDs. For a higher density, try

cargo run scripts/portal.pab --size 320

The language

I made this for my own amusement. Should I document the language structure? Of course! Will I? Eh, maybe.

beacon's People

Watchers

Andrew Plotkin 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.