包含了6种效果,分别是:
1.rainbow: 生成彩虹效果。
2.rainbowWithGlitter: 在彩虹效果中添加闪光点。
3.confetti: 随机彩色小点闪烁,平滑渐变。类似下雨的效果,由于hue的变化,导致了动态的颜色变化效果(hue变化和不变化产生两种效果)
4.sinelon: 一个彩色点往返移动,带有渐隐尾迹。(hue不变就是红色,变的话就是每隔20ms都会变呀)
5.bpm: 按一定的节拍脉动着不同颜色的条纹。一段段地来回挪动
6.juggle: 八个彩色点互相交替移动。hue变化和不变化差距不大
很重要的语句就是
EVERY_N_MILLISECONDS( 20 ) { gHue++; } // slowly cycle the "base color" through the rainbow.
上面这句话会导致色彩的变化.
/// @file DemoReel100.ino
/// @brief FastLED "100 lines of code" demo reel, showing off some effects
/// @example DemoReel100.ino
#include <FastLED.h>
FASTLED_USING_NAMESPACE
// FastLED "100-lines-of-code" demo reel, showing just a few
// of the kinds of animation patterns you can quickly and easily
// compose using FastLED.
//
// This example also shows one easy way to define multiple
// animations patterns and have them automa