problem uploading sketch

how can I upolad to different sketch in two different arduino from the same computer (IDE)?I have arduino a connect in “COM4” and arduino b conenct to “COM 12”.
when I upload one the other forget the program or stop to do what it was doing.
One arduino was running the serial port, after I uploaded the other arduino and when I went to see the serial monitor of the first one it appears this error

Error opening serial port ‘COM4’. (Port busy)

Any help?

Why don't you upload the sketches with one Arduino connected at a time?

Hmm… interesting. Each USB device should have unique ID so it should work. I’m not sure how it’s about Arduino. Isn’t the problem with this? I have none at hand to check it at now. BTW which devices exactly?

Now I see that your avatar is similar to mine. :slight_smile:

I am using arduino nano. I solved the problem connecting first one and uploading the sketch and then i connect the second one an uploaded the sketch. Thnak you for the answer!