#include <FastLED.h>
#define LED 2
#define NUM 80
CRGB leds[NUM];
void setup() {
// put your setup code here, to run once:
FastLED.addLeds<WS2812,LED,RGB>(leds,NUM);
}
//leds[i] = CRGB (random(0,255),random(0,255),random(0,255));
void loop() {
// put your main code here, to run repeatedly:
for(int i = 0 ; i < NUM ; i++)
{
//fill_gradient_RGB(leds,0,CRGB::Green,5,CRGB::Blue);
leds[i] = CRGB (random(0,255),random(0,255),random(0,255));
//(绿,红,蓝)
/*fill_solid(leds,16,CRGB(107,0,176));
fill_solid(leds+16,16,CRGB(169,239,13));
fill_solid(leds+32,16,CRGB(24,29,21));
fill_solid(leds+48,16,CRGB(147,5,65));
fill_solid(leds+64,16,CRGB(47,220,31));*/
FastLED.show();
delay(25);
}
}