简体   繁体   English

RGB LED褪色/过渡库

[英]RGB LED Color Fading/Transition Libraries

I'm looking for libraries of algorithms for color transitions over time. 我正在寻找随着时间推移颜色过渡的算法库。 Somehow I haven't found the right search terms to find a library that would fit my needs, but writing everything from scratch feels silly. 不知何故,我找不到合适的搜索词来找到适合我需要的库,但是从头开始编写所有内容却很愚蠢。 I've made good headway, but... reeeeally? 我取得了不错的进展,但是... reeeeally?

Here's some background... 这是一些背景...

My project has a handful of LEDs (well really, a handful light boxes, each with a pile of RGB LEDs inside), and I'd like to create a variety of color cycling patterns for the group of boxes. 我的项目有几个LED(实际上,有几个灯箱,每个灯箱内部都有一堆RGB LED),我想为这组灯箱创建各种颜色循环图案。 Some patterns would have all boxes cycle colors in sync. 某些图案会使所有框的周期颜色同步。 Some patterns might be start across the set. 某些模式可能在整个集合中开始。

In my implementation, each color cycling "pattern" would be defined by a series of colors and durations between each. 在我的实现中,每个颜色循环“模式”将由一系列颜色和每个颜色之间的持续时间定义。 At the end of the day, I'd have a variety of pattern concepts, like "fire" (red/yellow transitions with random flicker timing), "fireworks" (slow growing color to a frantic white flicker), etc. 归根结底,我会遇到各种各样的模式概念,例如“火”(带有随机闪烁定时的红色/黄色过渡),“烟火”(缓慢增长的颜色到疯狂的白色闪烁)等。

The hardware driving the whole thing would be Arduinos + the FastLED library, so C code is ideal. 驱动整个过程的硬件是Arduinos + FastLED库,因此C代码是理想的。

Hope this topic isn't outside of the StackOverflow Q&A format. 希望本主题不会超出StackOverflow问答格式。

It sounds like what you're really looking for is an array of example code. 听起来您真正要寻找的是一系列示例代码。 Ask on the FastLED g+ community ( http://fastled.io/+ ) - a lot of folks on there will happily share sample code. 在FastLED g +社区( http://fastled.io/+ )上询问-那里的许多人将很高兴地共享示例代码。 Also, look through the examples for FastLED itself. 另外,请查看FastLED本身的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM