Multiple pins with Fading example.

Sorry, if this sounds a bit noobish, but I am a noob and therefore full of noobishness.

I am trying to modify the fading example included in the examples, and I think I did this right, if not a bit clumsily, so I need to see if this is my hardware (could be, the leds I am using were in basement that flooded), or my software. This code compiles fine and I can’t see what is wrong with it, but as they say, it is always good to have someone else check your work.

Here is the code -

*/

int ledPin1 = 9; // LED connected to digital pin 9
int ledPin2 = 10; // LED connected to digital pin 10
int ledPin3 = 11; // LED connected to digital pin 11
int ledPin4 = 6; // LED connected to digital pin 6

void setup() {
// nothing happens in setup
}

void loop() {
// fade in from min to max in increments of 5 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin1, fadeValue);
analogWrite(ledPin2, fadeValue);
analogWrite(ledPin3, fadeValue);
analogWrite(ledPin4, fadeValue);

// wait for 30 milliseconds to see the dimming effect
delay(30);
}

// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin1, fadeValue);
analogWrite(ledPin2, fadeValue);
analogWrite(ledPin3, fadeValue);
analogWrite(ledPin4, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
}

You can see that all I did was add three extra pins to the whole thing. Seems like a simple, if not exactly elegant solution. Am I on the right track here, or is my noobishness showing?

Thanks in advance.

Nothing bad leaps off the page, but you didn't say what the problem was.