i don't know have code to make it fade up
Over what period of time?
for(int i=0; i<255; i++)
{
analogWrite(somePin, i);
delay(someTime);
}
The value in someTime will be 1/255 of the total time you want to take to fade up to full brightness.
and stay on for a long time like about 10 minutes.
delay(600000UL);
and then fade it back down to low light level.
for(int i=155; i>100; i--) // Fade to dim
{
analogWrite(somePin, i);
delay(someTime);
}
delay(180000UL); // Hold for 3 minutes
digitalWrite(somePin, LOW); // Then turn off