Oops didn't post my code.
Update: Light came on at 10am as per timer plug on the power supplies. Arduino came on and put the blue LED set on at 10/255. Lights gradually brightened and white set have begun to fade in about 10 minutes ago. It would appear my solution is working!
Forgot to point out, the LED unit is designed for a larger tank, which is why I'm running it at about 25% of it's full power. This will be tweaked as necessary as I'm currently adjusting how it's hung, and will soon be changing tanks (to a 30" long tank instead of a 12" cube).
/*
Fade
This example shows how to fade an LED on pin 9
using the analogWrite() function.
D3 White
D5 Blue
*/
int whiteled = 3;
int blueled = 5;
// the pin that the LEDs are attached to
// the setup routine runs once when you press reset:
void setup() {
// declare pin 3 to be an output:
pinMode(whiteled, OUTPUT);
pinMode(blueled, OUTPUT);
// set the brightness of pin 3:
analogWrite(blueled, 10); //10.00am
delay(1200000);
analogWrite(blueled, 15); //10.20am
delay(1200000);
analogWrite(blueled, 20); //10.40am
delay(1200000);
analogWrite(blueled, 20); //11.00am
delay(1800000);
analogWrite(blueled, 30); //11.30am
analogWrite(whiteled, 15);
delay(1800000);
analogWrite(blueled, 40); // 12.00pm
analogWrite(whiteled, 25);
delay(1800000);
analogWrite(blueled, 50); //1.00pm
analogWrite(whiteled, 35);
delay(3600000);
analogWrite(blueled, 60); //1.30pm
analogWrite(whiteled, 50);
delay(7200000);
analogWrite(blueled, 65); //2.00pm
analogWrite(whiteled, 70);
delay(14400000);
analogWrite(blueled, 55); //6.00pm
analogWrite(whiteled, 40);
delay(1800000);
analogWrite(blueled, 50); //6.30pm
analogWrite(whiteled, 35);
delay(1800000);
analogWrite(blueled, 40); // 7.00pm
analogWrite(whiteled, 25);
delay(1800000);
analogWrite(blueled, 35); // 7.30pm
analogWrite(whiteled, 20);
delay(1800000);
analogWrite(blueled, 25); // 8.00pm
analogWrite(whiteled, 20);
delay(1800000);
analogWrite(blueled, 20); // 8.30pm
analogWrite(whiteled, 15);
delay(1800000);
analogWrite(blueled, 15); // 9.00pm
analogWrite(whiteled, 0);
}
// the loop routine runs over and over again forever:
void loop() {
}
Just need to work out the RTC now to allow proper times to be used instead of the plug timer.
Also need to look into using an LCD shield with the Nano (I believe the 6 pin port is for this?) and also how I can add a manual mode with two Pots as dimmers instead of the preset values - I'm assuming an If statement? But then I'm unsure where I'd put this in when not running a loop?