Pin 11 HIGH/LOW Seem Reversed?

This is my first ever Arduino project. Trying to do the "Interactive Traffic Light" demo from the "Beginning Arduino" book, if anyone is familiar. I've gone over the wiring a million times and am pretty confident I have it right. I'm a programmer, but very novice with electronics, and brand new to Arduino.

Everything is working except the yellow LED on pin 11 seems reversed. I tested it, by just sending HIGH/LOW to that pin only, and HIGH turns it off and LOW turns it on... Is this an Arduino defect or could it be something else wrong that I'm just not finding after tracing my wiring repeatedly (which would be annoying, but I find it hard to believe this one pin is different...)?

and HIGH turns it off and LOW turns it on

If the LED is wired up so that the arduino sinks the LED current then this is how it will behave.
I have not seen the schematic so I don't know if it has been but it is not uncommon to do this.

Thank you for your reply. Odds are this is what's happening, as it's much more likely there's a flaw in my wiring than in the Arduino. Can you explain what "sink the current" means? I'm not sure what I'm looking for. The link below is a picture of the same thing, with what seem to me as minor, nonfunctional, differences. I'm going to go back over my wiring again though and see if I see anything different.

Thank you for your reply. Odds are this is what's happening, as it's much more likely there's a flaw in my wiring than in the Arduino. Can you explain what "sink the current" means?

There are two ways to power and light up a resistor/led string to a Arduino output pin.

#1 output pin > anode of diode > resistor > ground

#2 output pin > cathode of diode > resistor > +5vdc.

In number one if the output pin is high the LED draws current and lights up. The output pin is said to be sourcing current.

In number two if the output pin is low the LED draws current and lights up. The output pin is said to be sinking current.

Lefty

Thanks again for everybody's help! I fixed it. All the breadboard wiring was "mostly" right - the main problem was I had misaligned the ground and 5V pins, and had the ground plugged into 5V and the 5V plugged into 3.3V. By reversing the LEDs, it mostly worked, but that yellow light's on/off states were reversed. Finally saw that, fixed it, and reversed all the LED's and it works!

Just to be sure, it doesn't matter what side of the LED the resistor is on, right? In my schematic it goes:

output pin > resistor > anode of diode > ground

It works, so I'm assuming the resistor works on either side, which makes sense, I just want to make sure I'm not missing anything.

It works, so I'm assuming the resistor works on either side, which makes sense, I just want to make sure I'm not missing anything.

Yes, it's a series circuit, so order of the two components doesn't matter. Just like a three cell D size flashlight, it doesn't matter which battery goes first. :wink:

Lefty