I'm super new to this and already extremely frustrated.
I've got an official Arduino starter kit with an Arduino Uno. Done quite a few programs and had general success until today.
When I go to program the TX light gets stuck on and the software just sits forever. I've search and searched for help but it's too complicated to understand. Lots of different board types and terms that I don't understand yet.
It doesn't matter what code I use. I'm just using the Blink example code that comes with the official Arduino Windows software. At the time I started having issues I was programming in Chapter 8 digital hourglass.
yup... i'm dumb. I was using "Upload using Programmer" rather then just "Upload"
While I have everyone's attention though... Is there a step I should take before uploading a sketch if another sketch is already programmed into the Arduino? I was thinking that some really bad things could go down if a different sketch was in there when I plugged it into power with a new set of components.
psy-q:
yup... i'm dumb. I was using "Upload using Programmer" rather then just "Upload"
While I have everyone's attention though... Is there a step I should take before uploading a sketch if another sketch is already programmed into the Arduino? I was thinking that some really bad things could go down if a different sketch was in there when I plugged it into power with a new set of components.
No, just bear in mind that any existing sketch on the chip gets completely overwritten with the one you upload.
I've wondered about that as well. Suppose a pin were programmed as an output and then connected to hardware that was also driving that line. Could it result in damage?
jboyton:
I've wondered about that as well. Suppose a pin were programmed as an output and then connected to hardware that was also driving that line. Could it result in damage?
No. When you upload the chip is reset. As it's booting up (with all pins in their default INPUT mode), the new sketch is uploaded. Once uploading is complete, then the new sketch starts.
It's actually a valid concern. The hardware you have connected should agree with the current sketch. One approach is to disconnect your hardware before changing sketches.
An example might be where you had a normally-closed switch on a pin, and the new sketch drove the pin high.