3 fadeUp(pin[NW], 0, 255, 50);
4 fadeUp(pin[SW], 0, 255, 50);
5 fadeUp(pin[SE], 0, 255, 50);
6 fadeUp(pin[NE], 0, 255, 50);
8 fadeDown(pin[NE], 255, 0, 50);
9 fadeDown(pin[SE], 255, 0, 50);
10 fadeDown(pin[SW], 255, 0, 50);
11 fadeDown(pin[NW], 255, 0, 50);
14 void fadeUp(byte pin, byte from, byte to, unsigned long pauseMillis)
19 for(byte val=from; val<to; val+=step)
21 analogWrite(pin, val);
26 void fadeDown(byte pin, byte from, byte to, unsigned long pauseMillis)
31 for(byte val=from; val>to; val-=step)
33 analogWrite(pin, val);