Do's and Don'ts

Hi. I know this is a really noobish question but I can't seem to find anything definitive on this after a while searching.

As an Arduino beginner, are there any fundamental do's and don'ts in a typical circuit construction, programming, uploading and testing session? Are there any best practises particularly around disconnecting and reconnecting the USB?

Using the blink sketch as an example. I place an LED in Pin 13 and GND, load the sketch, upload it and it runs. If I know want to move the LED to a breadboard, should I disconnect from USB first so the Arduino has no power, create the new circuit then reconnect again? Or, let's say I already have one LED up and running on a breadboard. Can I add a few more LEDs with the Arduino already powered and then just upload a new sketch to activate them with the USB being connected the whole time?

What is the safest way both to protect the Arduino but also so that I am not constantly unplugging and replugging the USB cable either in the Arduino or in the PC which is probably to wear out the port.

Sorry again for a beginner question!

I place an LED in Pin 13 and GND,

Well the first lesson to learn is to never wire leds to output pins without series wired current limiting resistors to protect both the led and the output pin from damage. As you learn basic electronics principals you will learn and understand what you should and should not do. Trying to learn basic electronics my memorizing a lot of rules of do and do not topics is a very poor and error prone method of learning electronics fundementals.

But of course I felt compelled anyway to give you such a do not do 'rule', because I don't want to help you destroy your arduino output pin before you understand why you must use resistors with leds.

Lefty

If you understand what retrolefty wrote (always use a resistor with a led), I can tell you what my basic advice is: Buy a second Arduino board, in case you do something wrong.

Don't worry about the USB plug. The USB plug won't wear out fast.
If you have a wire with 5V accidently touching a component or a sensor, they could be blown. So rewire a powered circuit only if you know what you are doing.

Thanks Lefty. I've done a little breadboarding so was aware about the use of a resistor with an LED. I only used Pin 13 as an example because as I understood it that Pin 13 already has a in series resistor with the on-board LED.

Erdin. Thanks. It's good to hear that I won't be putting undue stress on the board by repeatedly unplugging and replugging the USB during my experimentations although your post suggests I should be okay with careful rewiring on the fly? I would only do that for basic changes anyway. If I was making more elaborate changes, then I'd definitely unplug first.

I was just wondering how others typically operate when building really.

Doyden:
Thanks Lefty. I've done a little breadboarding so was aware about the use of a resistor with an LED. I only used Pin 13 as an example because as I understood it that Pin 13 already has a in series resistor with the on-board LED.

The on board pin 13 LED does have proper current limiting resistor but only for it's on-board led. That on board resistor protection does not reach out to the shield pin 13 connection that has it's own direct connection path to the chip's output pin, therefore requiring an external series resistor if powering an external led. A good learning lesson would be to look up a schematic drawing of an arduino board and trace the current path for the on board LED Vs what the current path would be for an external led connected to the shield pin 13.
Lefty

Erdin. Thanks. It's good to hear that I won't be putting undue stress on the board by repeatedly unplugging and replugging the USB during my experimentations although your post suggests I should be okay with careful rewiring on the fly? I would only do that for basic changes anyway. If I was making more elaborate changes, then I'd definitely unplug first.

I was just wondering how others typically operate when building really.

Retrolefty is saying: NO! Pin 13 is still a output/input of the microcontroller, just as the other pins.