Easy way to upload code without detaching RX pin?

I have a Wemos receiving serial comms from an Uno. Whenever I upload code via USB to the Wemos, I have to disconnect the wire going into the RX of the Wemos or stop the Arduino from transmitting, which can be annoying, or else I get an upload error. I guess because the RX and USB share the same bus?

Is there some kind of code solution that can somehow disable the serial RX pin but still leave the USB open when code is being uploaded?

Delta_G:
The serial on the USB and the serial out the pins are physically connected. They're actually two things connected to the same pins on the chip. You can't disable one without disabling both since there's really only one. Unfortunately that's where you're at. You'll have to leave yourself an easy way to disconnect that. Maybe a jumper or something that you can pull when programming.

Damn, well that's annoying. But I guess everyone has to deal with the same issue when they're running Arduinos with the serial pins active, huh?

I guess everyone has to deal with the same issue when they're running Arduinos with the serial pins active, huh?

Only if you use the hardware serial pins and not SoftSerial instead.

UKHeliBob:
Only if you use the hardware serial pins and not SoftSerial instead.

Is it common for people to use SoftSerial more often than the hardware serial ports? I've never used Soft Serial before.

If for some reason hardware Serial cannot be used, is inconvenient to use or 2 serial ports are required on an Arduino that only has one hardware serial then it is quite common to use SoftwareSerial

Where possible it is better to use hardware Serial and there are boards available with more than one.

You can always use a Leonardo or Mega instead of an Uno :slight_smile: