Alternative to AnalogWrite() for Analog pin

Hi,

I'm working on a simple LED project.
I've used up all the digital pins for a task with the lolShield (http://jimmieprodgers.com/kits/lolshield/).
I'd like to be able to use the analog Pins as they are still free.

If I use analogWrite() on an analog pin, I get a LED to light up. I would like to try to get the LED to fade, like the one of the scripts in the getting started book (http://cdn.makezine.com/make/books/getstartedarduino/eg/Example_04.txt)

I understand analogWrite can only do this on one of the digital pins. Is there an alternative method I can use to achieve the same effect, so I can get a fading LED on an analog pin?

Thank you for any help,

M

The analogWrite() function can fade an LED on a PWM pin. None of the analog pins, in digital mode, are PWM pins. So, no, you can't fade an LED on an analog pin using analogWrite().

You might be able to bit-bang PWM, though, if you are skilled, but it won't be as easy as analogWrite().

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1268806013

Thank you - I'll give that a try!