int flowerlight1 = 13;
int flowerlight2 = 12;
int flowerlight3 = 11;
int flowerlight4 = 10;
int flowerlight5 = 9;
int flowerlight6 = 8;
void setup() {
pinMode(flowerlight1, OUTPUT);
}
void loop(){
fadeOn(1000,5);
fadeOff(1000,5);
}
void fadeOn(unsigned int time,int increament){
for (byte value = 0 ; value < 255; value+=increament){
analogWrite(flowerlight1, value);
delay(time/(255/5));
}
}
void fadeOff(unsigned int time,int decreament){
for (byte value = 255; value >0; value-=decreament){
analogWrite(flowerlight1, value);
delay(time/(255/5));
}
}