Help controlling 3 LEDs based on analog output

cattledog:
You need to set the pinMode of the led pin to OUTPUT in setup. Resistance should be chosen for 10-20ma through the led. With a 5v Arduino and a red, yellow, or green led 200-300 ohms is about right given the forward voltage drop.

void setup(void) {

Serial.begin(9600);
 pinMode(ledPin, OUTPUT);
}

Thank you! It should have been obvious that this was left out when I was combining the code to make something that would compile, It's now working beautifully with my original 220 ohm resistor.