Graynomad and tehjrow suggested two common uses for capacitors in Arduino projects:
-
electronically debounce a switch (as opposed to doing it in software like here: http://www.arduino.cc/en/Tutorial/Debounce
-
generate analog voltages using analogWrite(). You may have read that Arduino's "analog" output is really PWM, consisting of a timed mix of 100% and 0% voltages, with nothing in between. That's find for LEDs and hobby motors, but sometimes that won't work. For instance, if you wanted to play a nice smooth sine wave tone through a speaker, you'd need one or more capacitors to convert the square wave from the Arduino into a sine wave for the speaker. See here for more: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1268237950/12