I am fearly new to Arduino and FastLED. I found a nice Sketch which fits almost perfectly to my needs.
Just one Problem:
I dont want the Sketch to effect ALL LEDs in one color.
I want some LEDs in Red (ex. LEDs 0-4) Some in green and others in blue.
They could all have the same effect and timing, but it would be really neat if I could make them out of sync a little bit.
But having the possibility to make different LEDs different colored would be great. Here is the "Pulse" or "Breath" Sketch I want to use.
#include <FastLED.h>
#define NUM_LEDS 37
#define DATA_PIN 11
#define CLK_PIN 13
CRGB leds[NUM_LEDS];
int fadeAmount = 5; // Set the amount to fade I usually do 5, 10, 15, 20, 25 etc even up to 255.
int brightness = 0;
void setup()
{
FastLED.addLeds<APA102, DATA_PIN, CLK_PIN, BGR>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness(50);
}
void loop()
{
for(int i = 0; i < NUM_LEDS; i++ )
{
leds[i].setRGB(0,255,250); // Set Color HERE!!!
leds[i].fadeLightBy(brightness);
}
FastLED.show();
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if(brightness == 0 || brightness == 255)
{
fadeAmount = -fadeAmount ;
}
delay(80); // This delay sets speed of the fade. I usually do from 5-75 but you can always go higher.
}