This sketch will dim multiple channels of LED's to simulate Sunrise, Sunset and Moonlight. It was written for the Arduino Mega but can be modified for any Arduino by changing the pin configuration. It also supports external fan control via PWM.
For this software to work as designed the Arduino has to be interfaced with a real-time clock. It also should be connected to an LCD, an SPST switch and 3 Pots. The 3 10k pots control the LCD dimming and manual control of the blue and white channels.