I have 3 seperate light strips each wired to their own output pin on the Arduino. I tried this simple built in temperature function within FastLED "candle" to set all of the strips to the same warm hue. They all show varying hues of orange/red as if FastLED is thinking that all 3 LED strips are actually 1 long strip consisting of 864 Leds instead of 3 strips, 288 a piece. How can I get all 3 strips to show the same thing?
#include "FastLED.h"
#define NUM_LEDS 288
#define CHIPSET WS2813
#define COLOR_ORDER GRB
#define BRIGHTNESS 200
#define LED_PIN_1 9 // Pin number for the first strip
#define LED_PIN_2 10 // Pin number for the second strip
#define LED_PIN_3 11 // Pin number for the third strip
#define TEMPERATURE_1 Candle
CRGB leds_1[NUM_LEDS];
CRGB leds_2[NUM_LEDS];
CRGB leds_3[NUM_LEDS];
void setup() {
Serial.begin(9600);
delay(1000);
FastLED.addLeds<WS2812, LED_PIN_1, GRB>(leds_1, NUM_LEDS);
FastLED.addLeds<WS2812, LED_PIN_2, GRB>(leds_2, NUM_LEDS);
FastLED.addLeds<WS2812, LED_PIN_3, GRB>(leds_3, NUM_LEDS);
FastLED.setCorrection( TypicalSMD5050 );
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
// Set the color temperature for each strip
for (int i = 0; i < NUM_LEDS; i++) {
FastLED.setTemperature( TEMPERATURE_1);
leds_1[i] = TEMPERATURE_1;
leds_2[i] = TEMPERATURE_1;
leds_3[i] = TEMPERATURE_1;
}
FastLED.show(); // Update all LED strips
delay(100); // Delay between updates (adjust as needed)
}
They are NOT identical and that is the problem. I believe the FastLED “candle” color is a soft gradient from light yellow to red. One of my strips is light yellow, the next is yellow orange and the third strip is orange red. That is the issue. I cannot figure out what to change in the code to make all 3 strips show the same gradient, not the entire gradient spread across the 3 strips.
I would also like to avoid connecting all 3 strips to the same signal pin on the Arduino for future projects.
#include "FastLED.h"
#define NUM_LEDS 288
#define BRIGHTNESS 200
#define LED_PIN_1 9 // Pin number for the first strip
#define LED_PIN_2 10 // Pin number for the second strip
#define LED_PIN_3 11 // Pin number for the third strip
uint32_t ColorPallete[] = {CRGB::Red, CRGB::Orange, CRGB::Yellow, CRGB::LightYellow };
CRGB leds_1[NUM_LEDS];
CRGB leds_2[NUM_LEDS];
CRGB leds_3[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, LED_PIN_1, GRB>(leds_1, NUM_LEDS);
FastLED.addLeds<WS2812, LED_PIN_2, GRB>(leds_2, NUM_LEDS);
FastLED.addLeds<WS2812, LED_PIN_3, GRB>(leds_3, NUM_LEDS);
FastLED.setCorrection( TypicalSMD5050 );
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
// Set the color temperature for each strip
for (int i = 0; i < NUM_LEDS; i++) {
byte Index = random(4);
leds_1[i] = ColorPallete[Index];
leds_2[i] = ColorPallete[Index];
leds_3[i] = ColorPallete[Index];
}
FastLED.show(); // Update all LED strips
delay(100); // Delay between updates (adjust as needed)
}