Disconnecting the UART pins before uploading code to the Arduino

I think you have noticed that it is necessary to disconnect the UART communication pins (TX, RX) from the Arduino Nano when they are connected to another module (in my case, a Bluetooth HC-05 module) in order to upload the code.
Is there another way to upload the code to the Arduino without having to disconnect the TX and RX pins?

Before uploading the code to Arduino, I need to disconnect TX and RX :

After uploading the code to Arduino, I need to reconnect TX and RX :

1 Like

I don't think there's a way around this. It is just the way a Nano is made. This can hardly be a big deal. It simply means that you leave the connection till the end of the day. You can do all of your debugging before you even buy your HC 05, reasonably secure in the knowledge then that any subsequent glitches are at the other end, and not down to Arduino.

1 Like

There are resistors in the design to allow you to overdrive it. Youi simply disable the output of the HC-05. That may not be possible on some Nano units as they are not all the same.

1 Like

Use another board where the USB functionality is not connected to pins 0 and 1. The Nano Every comes to mind if the Nano form factor is important.

Note that libraries that are specifically written for the AVR core will not work.

1 Like

You can upload code directly to the Nano via the 6 pin ICSP header. You would need a separate programmer for it (e.g. USBASP) or use "Arduino as ISP". This way of programming will wipe your bootloader, but you can put that back with the command "burn bootloader"

And, after reading posts #3,4,5, you just might conclude that none the above is worth the effort, and you might as well stick with removing the connection....

But if you use any SPI devices you will need to disconnect them.

1 Like

Oh gawd, after all these years, I think I now know why that cluster is not repeated on the top of the ethernet shield......

1 Like

Why not use software serial for the HC-05

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.