Why do I have to remove RX and TX digital pins before uploading a sketch
I made a robot car. It can work both on bluetooth manually and autonomous "mode" where it works as an obstacle avoider. I want to have the ability to switch between the two modes using something my a switch. I know it sounds stupid but is it posibile?
Why do I have to remove RX and TX digital pins before uploading a sketch
RX and TX (hardware serial pins) are the pins by which the sketch is uploaded to the processor when using serial upload. Apparently you are using the hardware serial for other hardware and that interferes with upload. Which Arduino are you using? If a 328 based, you can use a software serial port for your hardware and leave hardware serial for upload and debug. If a Mega (and others) there are multiple hardware ports.
It is hoped that the following diagram will help you to find the technical reason why we should temporarily disconnect the jumper wires from TX/RX pins of the UNO from the external circuits before uploading sketch into the UNO?
That diagram is not helpful to me (too convoluted), and I know why.
It's simply because those two pins are used for the uploading process (they're connected to the USB/TTL converter on the PCB). And whether you have to disconnect other hardware, depends on what that hardware it is. I've successfully uploaded software with stuff connected to TX and/or RX, and also ran into situations where I had to disconnect those things. It's generally better to disconnect TX and RX (and not use them as long you have any other pins available in the first place).