Can you run an LED with analog pins?

I guess you could try putting

PORTC = 0;

in your setup() function and see if that fixes the problem. If not, maybe pinMode() isn't designed to work on the analog pins, in which case just use the DDRC register to change the mode of the port C pins from input to output. Bit 0 of DDRC controls the output state of analog input 0, bit 1 controls the output state of analog input 1, etc. When the bit is a 1, the pin is an output. When the bit is a 0, the pin is an input.

  • Ben