I was wondering if someone could help me with a problem.

I was wondering if someone could help me with a problem. I need to enable blending on a part of this code. No matter what I try I cannot get blending to work.

http://pastebin.com/2r9Fi12S

Have a look at the FastLED example sketch ‘ColorPalette.ino’ to see in action the effect of…

currentBlending = BLEND;

and…

currentBlending = NOBLEND;

They apply to color palettes and you have none defined !!!

I know that. Is there a way to enable blending without a palette defined. I don’t really want to have to use a palette unless i have to as im only using two colors and black

By blending do you mean smooth transition between one color to another ???

Yes, I would like to blend from blue to black

I guess you are looking for something like this to go from black to red…

for (int j = 0; j < 255; j++) {
for (int i = 0; i < NUM_LEDS_BTAIL; i++) {
bTotal[i] = CRGB(j,0,0);
}

FastLED.show();
delay(10);

}

and here’s the reverse from red to black…

for (int j = 255; j >= 0; j++) {
for (int i = 0; i < NUM_LEDS_BTAIL; i++) {
bTotal[i] = CRGB(j,0,0);
}

FastLED.show();
delay(10);

}

Thank you, thats exactly what i was looking for.

I have a problem with the code you showed me. I can only get it to fade into a color, i cant figure out how to get it to fade from a color to black. Here is how I’m using my code.

http://pastebin.com/2VEPSdz8

@Johnny_Woods_Masamun Can you explain how your LEDs are configured between the bbranch and the btail and the btotal ??

bTail and bBranch are segments of bTotal on the led layout that i have. They are different strips but are all treated as one array. 14 leds in the tail and 8 leds in the branch

@Johnny_Woods_Masamun Could you draw or provide a picture of that layout ?

Sorry, forget about the drawing, just confirm that you have a strip 54 LEDs but it is layout such that you 1st have a tail ot 14 leds followed by 5 branches of 8 LEDs.

you have many weird statements in that sketch, too many to list here but I think I see your main problem…

replace this…

for (int j = 255; j >= 0; j++) {

with…

for (int j = 255; j >= 0; j–) {

better still replace with…

for (int j = 255; j >= 0; j=-3) {

and in all the other lines just write…

  bTotal[i] = CRGB(0, 0, j); 

and not j*3

ok thanks, will try

ooops… it should be…

for (int j = 255; j >= 0; j-=3) {

You should delete these lines as they are not needed for your sketch…

CRGB bBranch[NUM_LEDS_BBRANCH];
CRGB bTail[NUM_LEDS_BTAIL];

also…

TBlendType currentBlending;

and also…

currentBlending = BLEND;

As I explained, BLEND is only applicable to palettes !!!

Figured it out, Thanks for your help!

Hi again @Johnny_Woods_Masamun ,

What exactly are trying to do for animation.

Right now, all LEDs of all 5 branches (40 in total) behave exactly the same. Is that what you want ?

Is there a way to enable blending on a strip of leds without enabeling a palette. I want to keep away from palettes if i can as i am only using two colors

@Johnny_Woods_Masamun Didn’t we answer that already ???