Fastled, WS2812 LED strip slowly transition through all colors.

Hi,
I would like to create a slow transition through all colors.

I'm using a WS2812B led strip with fastled.

Is there someone who can share its sketch to do it?

Thanks.

Is there someone who can share its sketch to do it?

Yes, you have this already in the examples folder that comes with the library.

Grumpy_Mike:
Yes, you have this already in the examples folder that comes with the library.

I can't find it sincerely.
Do you mean the Cylon effect?

I would like something that slowly transition ALL LEDs in the same time.

There are 20+ example sketches.
Try them all and then come back if you want something different.

.

ieee488:
There are 20+ example sketches.
Try them all and then come back if you want something different.

.

there is no effect in that examples that is similar to what I would like.
I would like a slow fading through all colors.

but all leds should fade to same color at the same time.

Can you be more specific about you what you want to do?

I would like a slow fading through all colors.

Is open to many interpretations.
What do you mean by all colours? Primary and secondary? Colours on an HSV colour wheel? Colours on an RGB cubic space? Do you want to fade from say red to blue then back to yellow and then to green, or what?

Grumpy_Mike:
Can you be more specific about you what you want to do?Is open to many interpretations.
What do you mean by all colours? Primary and secondary? Colours on an HSV colour wheel? Colours on an RGB cubic space? Do you want to fade from say red to blue then back to yellow and then to green, or what?

yes, slowly fading between the external colors of this circle could be cool.

So all the LEDs are to be the same colour and you slowly fade all of them at once round the colour wheel?

If so there is a function to request HSV colours. The documentation is here FastLED HSV Colors · FastLED/FastLED Wiki · GitHub

There are examples of how to do what you want on that page.

Grumpy_Mike:
So all the LEDs are to be the same colour and you slowly fade all of them at once round the colour wheel?

If so there is a function to request HSV colours. The documentation is here FastLED HSV Colors · FastLED/FastLED Wiki · GitHub

There are examples of how to do what you want on that page.

thank you Mike, you are always so kind, I appreciate it.

I have done a simple rainbow effect like this:

  //EFFECT RAINBOW
  if (effectString == "rainbow") {
    // FastLED's built-in rainbow generator
    static uint8_t starthue = 0;    thishue++;
    fill_rainbow(leds, NUM_LEDS, thishue, deltahue);
    if (transitionTime == 0 or transitionTime == NULL) {
      transitionTime = 130;
    }
    showleds();
  }

the problem is that this type of rainbow gradually change color from one led to another led.
I want exactly what you wrote:
"So all the LEDs are to be the same colour and you slowly fade all of them at once round the colour wheel?"

how can I do it, that docs doesn't help me that much

ok I solved this way, thanks

  //EFFECT RAINBOW
  if (effectString == "rainbow") {
    // FastLED's built-in rainbow generator
    static uint8_t starthue = 0;    thishue++;
    //fill_rainbow(leds, NUM_LEDS, thishue, deltahue);
    fill_solid(leds, NUM_LEDS, CHSV(thishue,255,255));
    if (transitionTime == 0 or transitionTime == NULL) {
      transitionTime = 130;
    }
    showleds();
  }

Would this not do it as well?

//EFFECT RAINBOW
    static uint8_t starthue = 0;    
    thishue++;
  if (effectString == "rainbow") {
    // FastLED's built-in rainbow generator
    fill_rainbow(leds, NUM_LEDS, thishue, deltahue);
    if (transitionTime == 0 or transitionTime == NULL) {
      transitionTime = 130;
    }
    showleds();
  }

That is don't increment the "thishue" variable inside the if loop but only once on entry.

Would setting deltahue to zero make fill_rainbow() almost equivalent to fill_solid()