Can an old sketch with new hardware damage the arduino?

Not sure where to post this, since it won't count as troubleshooting because the problem hasn't happened yet, and I can't find any hardware guidance forum.

Anyway, exactly what it says up top, can your arduino be damaged when it starts running a sketch when you plug it into your computer to download a new one? I'd imagine if your inputs are different it may be a problem...

No. If you ran an old sketch having changed the things you had attached it to, you might be able to manage it, but otherwise, there's no risk.

That's what I meant, with new hardware.

Then yes. If you put something on a digital pin that draws a lot of current (where a lot is more than 40mA) and your old sketch set it high, you could burn out the pin.

I had the idea as well when I'm changing things quite a bit, that it may not be the best to have the old sketch run with a new setup. I wasn't worried about damaging stuff, but more whether my stuff was in the right position. So, I've started not actually running motors, etc. until I press a button.

The alternative might be to reinstall something harmless like the blink example if you know you are going to change all of the pin assignments.

MichaelMeissner:
I had the idea as well when I'm changing things quite a bit, that it may not be the best to have the old sketch run with a new setup. I wasn't worried about damaging stuff, but more whether my stuff was in the right position. So, I've started not actually running motors, etc. until I press a button.

The alternative might be to reinstall something harmless like the blink example if you know you are going to change all of the pin assignments.

The best thing is to install a "blank" sketch with an empty setup() and loop(), before moving the Arduino to a new piece of hardware (unless you know nothing is connected to pin 13 - then the blink sketch is ok).

Thanks, I'll start doing that now.