fading out effect on a bunch of LEDs
If you don't mind experimenting around a little bit with the timing you can use something like that:







simulate this circuit &ndash; Schematic created using CircuitLab

R1 and C1 set the transient behaviour, R2 is only to limit the current over the switch, dont make it too large. If you don't care about losses you can also use a N-channel MOSFET instead. R1 and C1 have to be between G and GND, R2 and SW1 between D and G. The N-channel circuit gives you a better control about the fading (if you want to produce your circuit in large quantities) but you will always have a dropout voltage of Vth from D to S.