Let's Make Robots!  Fading an LED with hardware  Gillerire's
picture  Hi guys,  I am trying to get an LED (attached to the
i/o port of a microcontroller) to fade in and fade out without
using PWM.  I hooked up a resistor and LED pair in parallel with
a large-ish polarised capacitor, thinking that as the cap
charged it would prevent some current getting to the LED,
resulting in a fade up to full brightness.  When power was
removed the cap would then slowly empty it's charge through the
LED, resulting in a fade out.  It worked for the fade out but
not the fade in; it simply went to full brightness when power
was applied.  I realised I would need another resistor between
power and the cap to limit the speed at which he cap could
charge.  I set this up (see figure below) and it is kind of
working; I get both a fade in and a fade out.  But the fade in
speed is not the same as the fade out speed.  I'm wondering if
anybody knows if there is a way to calculate what
resistor/capacitor values will give different fade i