Multiple CRGB objects question… I’ve got 3 pins, with a different number of LEDs on each pin. I want to be able to control them separately or together. I want to be able to run the same animations (more or less) on each strip. I’ve got each one set up as its own CRGB object, but I can’t figure out how to make the CRGB object into a variable.
I feel like there must be some “int” or “const” or “string” or something I could use for this. Thanks for your help!
#include “SoftwareSerial.h”
#include <FastLED.h>
#define NUM_LEDS 5 // Number of Pixies in the fiber optics
#define NUM_PIXIES 2 // number of pixies in the underglow
#define NUM_CROWN 60 //number of pixies in the crown
#define PIXIEPIN 12
#define FIBERPIN 6
#define CROWNPIN 9
CRGB leds[NUM_LEDS]; //is this the right way to do this?
CRGB strip[NUM_PIXIES];
CRGB crown[NUM_CROWN];
void setup()
{
Serial.begin(9600);
LEDS.addLeds<PIXIE,FIBERPIN,RGB>(leds, NUM_LEDS).setDither(30);
LEDS.addLeds<PIXIE,PIXIEPIN,RGB>(strip, NUM_LEDS).setDither(0);
FastLED.addLeds<NEOPIXEL, CROWNPIN>(crown, NUM_LEDS);
}
//------------------MAIN LOOP----------------
void loop() {
{
fill_solid(leds, NUM_LEDS, CHSV(HUE, SATURATION, BRIGHTNESS)); // Can I change “leds” in this line with a variable of some kind? So I can use this function on the crown or underglow lines?
FastLED.show();
delay(20);
}