I building a model train room and I want to do sunrise to sunset light theme does anyone have some code I could look at?
What have you tried out?
I have one using a gradient if you want. It starts with a light blue - pink gradient (sunrise) then fades into navy-orange (sunset) & back.
CRGB endclr;
CRGB midclr;
uint8_t speed = beatsin8(6,0,255);
void sunrisetoset() {
endclr = blend(CRGB::LightSkyBlue, CRGB::Navy, speed);
midclr = blend(CRGB::Pink, CRGB::Orange, speed);
fill_gradient_RGB(leds, 0, endclr, NUM_LEDS/2, midclr);
fill_gradient_RGB(leds, NUM_LEDS/2+1, midclr, NUM_LEDS, endclr);
}
I know that the effect works but I haven’t tried out the colours yet, so they might look crappy together but you can just tweak them if that’s the case.
Thanks Maddy I will give it a try