#include <FastLED.h>
#define NUM_LEDS 16
#define LED_PIN_RING 3
CRGB ledsRing[NUM_LEDS];
// Color Gradients
uint8_t paletteIndex = 0;
DEFINE_GRADIENT_PALETTE(red_gp){
0, 255, 0, 0,
255, 127, 0, 0
};
CRGBPalette16 red_palette = red_gp;
uint8_t BPM = 100;
void setup() {
FastLED.addLeds<WS2812B, LED_PIN_RING, GRB>(ledsRing, NUM_LEDS);
FastLED.setBrightness(255);
FastLED.clear();
FastLED.show();
}
void loop() {
//fill_palette(ledsRing, NUM_LEDS, paletteIndex, 255 / NUM_LEDS, red_palette, 255, LINEARBLEND);
//FastLED.show();
EVERY_N_MILLISECONDS(60000 / BPM / 80){
fill_palette(ledsRing, NUM_LEDS, paletteIndex, 255 / NUM_LEDS, red_palette, 255, LINEARBLEND);
paletteIndex++;
FastLED.show();
};
}