I'm new to FastLED and trying to write a sketch with two LED strands

fastled-support
gplus
(Peter Taylor) #1

I’m new to FastLED and trying to write a sketch with two LED strands that need different brightness settings due to location. Is there a way to set brightness levels for these strips independently?

(Marc Miller) #2

You could use the Color Correction feature to drop the brightness of one of the strips.

//first strip unchanged:
FastLED.addLeds<WS2812, 11, RGB>(leds, NUM_LEDS);

//second strip with reduced brightness
FastLED.addLeds<WS2812, 12, RGB>(leds2, NUM_LEDS).setCorrection(200,200,200);

(Peter Taylor) #3

@marmil Thanks, I’ll try that!

(Peter Taylor) #4

@marmil it didn’t like it. Here’s what I had that did work:

FastLED.addLeds<NEOPIXEL, PIX1>(leds1, NUM_LEDS1).setCorrection(TypicalLEDStrip);

I got the TypicalLEDStrip from an example sketch. As soon as I replace that with numbers I get an error.

no matching function for call to ‘CLEDController::setCorrection(int, int, int)’

(Marc Miller) #5

@Peter_Taylor Try changing the:
setCorrection(200,200,200)
to this:
setCorrection(CRGB(200,200,200))

(Jerome Boulinguez) #6

@marmil : 200 is a intensity (0 to 255) like general BRIGHTNESS parameter ?

(Marc Miller) #7

@Jerome_Boulinguez range is 0 to 255. Set correction is designed to color correct an LED strip. For example, if the strip was too blue, the blue could be reduced by using (255,255,200). By keeping all three numbers the same it doesn’t change the color correction but rather just reduces the overall brightness.
Did you try it out?