#include <FastLED.h>
#define LED_PIN 7
#define NUM_LEDS 50
#define LED_TYPE WS2811
CRGB leds[NUM_LEDS];
uint8_t paletteIndex = 0;
uint8_t ColorIndex[NUM_LEDS];
uint8_t colorIndex[NUM_LEDS];
CRGBPalette16 GreenFade= CRGBPalette16{
CRGB::Blue
};
CRGBPalette16 GreenLink = GreenFade;
void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(100);
}
void loop()
{
TurnOnFadeLinkGreen();
}
void TurnOnFadeLinkGreen() {
uint8_t sinBeat = beatsin8( 40, 50, 255, 0, 0 );
for ( int i = 0; i< NUM_LEDS ; i++ ) {
leds[i] = ColorFromPalette(GreenLink, ColorIndex[i], sinBeat);
}
for( int i = 0; i< NUM_LEDS ; i++) {
colorIndex[i] = random8();
}
FastLED.show();
}