/ledsgo

LED animation library written in Go, inspired by FastLED

Primary LanguageGoMIT LicenseMIT

Color utilities for LED animations

This package is a collection of some utility functions for working with color. It is primarily intended for LED animations on microcontrollers using TinyGo, therefore it has been optimized for devices without FPU.

It is inspired by FastLED but does not implement any drivers for LED strips to keep development focused on fast animations.

Noise functions

This package contains a number of Simplex noise functions. Simplex noise is very similar to Perlin noise and produces naturally looking gradients as you might encounter in nature. It is commonly used as a building block for animations, especially in procedurally generated games.

Be warned that Simplex noise is patented (set to expire on 2022-01-18) so use at your own risk for computer graphics. This patent may or may not apply to LED animations, I don't know.

Animation demos

There is a demos subpackage which contains a number of simple animations that can be directly applied to surfaces implementing the Displayer interface.

License

This package is licensed under the MIT license, just like the FastLED library. See the LICENSE file for details. Some code has been copied from the FastLED library, this is indicated in the code.