I upload a program to the UNO and have all the wiring in place on the breadboard. all is good. So now I want to upload a different program with different wiring. So I have wired the breadboard to prepare for the new program but when I plug in the UNO it runs the existing code in memory until I upload the new code. What if, for example the UNO is trying to read pin 12 from old code but I have an LED there now and different wiring...could this be a potential problem? is there a way to plug in USB without the old code running right away so that I can upload the new code (which corresponds to the new wiring)?
Ok that makes sense but what if the old code runs upon plugging usb in and potentially causes a short with the new wiring? For example the old code has an LED connected to pin 11 but new wiring has a diode there. Now old code runs as soon as USB is plugged in and old code tries to run the LED on pin 11 but is routed to a diode for example.