Disconnect HC-05 whilst uploading

I have an embedded project that uses a nano and a HC-05 bluetooth module.

I know I have to disconnect the BT module to upload a new sketch, but the problem I have is that they are both contained in a box that I don't have great access to.

I have extended the usb port so I am able to plug a lead in, but I can't keep opening the box every time I wish to update the sketch.

What would be the best way to achieve this?

Dan

I hate to admit to this but now is the time to put the HC-05 on software serial and adjust your code accordingly. This may include reducing the baud rate to 9600 or the next one up. This will allow you have the hardware serial port exclusively for uploading.

If fast baud rate, programme speed and reliability are important, I guess you could:

  1. get a Mega, which has four hardware serial ports

  2. cobble up a remotely switched relay ion the HC-05 power line.

I also understand there are other ways to programme Arduino than simply plugging in the USB cable. None seems to be desirable and I assume they are only for the desperate.

Thanks Nick

A mega wouldn't fit in the box, so I'll look at soft serial. Baud rate not an issue.

Cheers

Do you have space on the box for a small switch ?

If you put a switch in the Arduino Rx line, you can effectively disconnect the HC-05 during upload, and switch it back in when you're done. I've done similar in the past to save having to unplug wires each time.

Ian.