Take a look at this page.
Have you had calculus yet?
A capacitor discharging through a resistor is an exponential function. (Since the current is not constant, you cannot use C = I x t except for "one instance" in-time.)
The circuit schematic is too far away, but let me guess :The capacitor is in parallel with the LED.The switch is in parallel with the LED.The resistor is not used.
See the attached schematic.
QuoteSee the attached schematic.You short the supply into the capacitor - add a small value resistor in series with the switch if you want to avoid welding it shut and resetting the Arduino!
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16