#include <FastLED.h>
#define NUM_LEDS 32
#define BASE_HUE 180
#define DATA_PIN 2
//CRGB leds[NUM_LEDS];
CRGBArray<NUM_LEDS> leds;
void setup() {
// put your setup code here, to run once:
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
FastLED.clear();
//fill_solid(leds, 10, CRGB::Aqua);
leds[0] = CRGB::AliceBlue;
//DrawLightCurve(8, 2);
FastLED.show();
}
void DrawLightCurve(int peakIndex, int width) {
int curveMin = qsub8(peakIndex, width);
int curveMax = qadd8(peakIndex, width);
for(int i = curveMin; i <= curveMax; i++)
{
leds[i] = CHSV(BASE_HUE, 255, 255);
}
}
void HSVForMe() {
for(int i = 0; i < NUM_LEDS; i++)
{
uint8_t mappedIndex = map(i, 0, NUM_LEDS - 1, 0, 255);
leds[i] = CHSV(BASE_HUE, 255, triwave8(mappedIndex));
}
FastLED.show();
}