[Solved] LED bar...but inverted !?

I can't tell from the picture if the black wire is connected to GND or 5V. You didn't answer my questions so I'll assume you don't want to continue discussing how the circuit is wired.

I can't see any problems with your Sketch. Unless someone else can spot a problem, I guess you're stuck with an inverted Knight Rider.