Uno reversed polarity?

Hey everyone,

I have a strange question. Like a lot of people here I'm new to Arduino. So excuse me if this is a dumb question but if I upload the blink program from the library into an UNO and I put an led and a resistor on pin 13 should my led and the one built into the board blink at the same time or should they alternate? I know it's an odd question but I was in the middle of a project and strange things started happening and now my UNO switches ground and not any positive voltage on digital outputs. I'm wondering if I burnt something.

if I upload the blink program from the library into an UNO and I put an led and a resistor on pin 13 should my led and the one built into the board blink at the same time or should they alternate?

That depends on how you wire the external LED. Pin 13 will alternate between HIGH (5V) and LOW (GND) so depending on whether you connect the external LED to 5V or GND it will be in phase with the built in LED or not

You should check with blink and a multimeter and make sure that you can output both HIGH and LOW. If you can't, you have damaged the arduino severely enough that it belongs in the trash.

That all said - as UKHeliBob said, you can wire LEDs either way around; the builtin LED is wired to turn on with a HIGH (ie, negative side of led tied to ground, positive side to pin, with a resistor in there somewhere), but if you put the positive side on 5v, and negative side to the pin (plus a resistor, ofc), it will go on when the pin is LOW.

Personally, except for builtin LEDs on my breakout boards for attiny's (where I am trying to copy the behavior of official boards wrt the builtin LED), I default to wiring LEDs and other loads to be active low (ie, LOW turns them on) if driving the load directly; if driving heavier loads through transistors, I use n-channel fets on the low side of the load, so you need a high to turn it on.

So what you guys are saying is that when one of the output pins goes low that it isn't open, it's grounded? Using my meter I can never see any positive voltage on any output pins, only ground.

If I did burn out something on the UNO what's the likelihood that I could just get a new chip to fix it?

Either way thanks guys for your help.

Is the 328 chip on the Uno in a socket or is it soldered to the board ?
A photograph would help

You may, of course, have damaged more than just the main chip

It's a socket.

Then you should be able to change the chip, but as I said it may not be the only problem but before you do that let's review the problem

Write a small program that sets pin 2 HIGH and pin 3 LOW in setup() then prints a message to the Serial monitor every second in loop().

Does it upload to the Uno ?
Does the message appear on the Serial monitor every second ?
What is the voltage between GND and pin 2 ?
What is the voltage between GND and pin 3 ?

If it does turn out to be bad, you can buy pre-bootloaded parts, here is one from Adafruit for example

(forum might stick some extra characters at the start and end of that link, just delete them)