I'm using a slow palette transition for a sunrise/day/sunset simulation and so far figured

fastled-support
gplus
(Andreas Hopf) #1

I’m using a slow palette transition for a sunrise/day/sunset simulation and so far figured out the sunrise part, using a paletteknifed palette. I don’t yet know how then to transition to a day and then sunset palette. Probably one simply has to fashion a single long palette from all three to cover an entire day? But that gives rise to timing problems, I suppose? Better to concatenate three separate animations of 1/9/1 hours?

In any case, the major issue I have is how, from start to finish, to have the LEDs shimmer, meaning to have all LEDs randomly flicker very subtly while the palette transition does its thing. Think light through moving grass, foliage or clouds. The code is here https://forum.arduino.cc/index.php?topic=571308.msg3892298#msg3892298

Any help much appreciated!

(John Sullivan) #2

Copy sunrise transition and swap last to first and decrease counter

(Marc Miller) #3

Hi @Andreas_Hopf Are you wanting to have random pixels shimmering, or random blocks of pixels shimmering, or the whole strip shimmer as one?

For the shimmering, I think I would do that in a separate array that then gets added to the long day sunrise/day/sunset transition effect. That way you can iterate on the shimmer array however and at whatever speed you like. Then that can then be added to whatever the current day transition color is (which changes very slowly).

Here’s some sketches you can look into that might give you some ideas of how to do the shimmering and how to combine it with the palette transition.

As far as using 1 or 3 palettes for the transition sections, either should work. Just a mater of how you want to set things up.

(Andreas Hopf) #4

@John_Sullivan1 Thanks, but… what do you mean? Swap what with what? Decrease which counter?

(Andreas Hopf) #5

@marmil Thanks, what I mean is that all LEDs should flicker subtly and randomly, not all LEDs in unison. I look through your links right away.

From the 1st link, I glean that I would need a 2nd function flickerEffect and then, as in the 1st link example, call skyEffect and flickerEffect in the loop and then call FastLED.show(). The flickerEffect would somehow have to only operate randomly on the brightness of a random number of LEDs. The colours for each LED previously generated by the call to the skyEffect function would not be affected. The two effects, operating on the entire strip, but in different ways, would thus mix. Is that the correct way of going about it?