This question is a follow on from this one - Fine control of an LED - Programming Questions - Arduino Forum that I posted in Programming.
I was seeking a way to have a smoother LED fade, and implemented many of the suggestions that were made, I now have a non linear fade (more of a fade curve) which looks a lot more natural, the problem im still experiencing is the noticeable steps in brightness as digitalWrite() gets below 10, especially step 1 to 0.
I was thinking of using a 470uF capacitor that would allow the LED to fade in a smoother way, unfortunately my setup includes the LED blinking in a random arrangement prior to fading, and the capacitor messes this up by discharging during the blinking stage.
My other thought was to have the capacitor connected to a separate output pin (a different one than the LED is connected to), and when digitalWrite() gets to zero, the capacitor would then discharge, creating a smooth fade to black.
Ive looked at lots of examples but cant find anything similar, not even sure if its possible. I would normally test most of my theories out myself before asking for help, but with the possibility of a capacitor discharging and frying my arduino, I thought its best to ask before blindly experimenting.