Sketches (yes, plural) cannot connect to the USB port selected in the TOOLS menu. The sketch tries 10 times, of course, and then declares failure. The port IS selected by using the TOOLS menu for the sketch. In Windows 10 the Device Manager shows the port allocated to the Arduino UNO. As the connection error continue to show in notification the upload failes, on the basis that the Sketch is NOT connect to the port.
The circuit and sketch have an HC-05 bluetooth device but the VCC for that device is disconnected from the circuit. Removing the USB plug from the UNO and then reconnecting it does not help, either
On a previous occurence I swapped UNO boards. That worked 2 or 3 times but the the non-connect problem reappeared.
Tom Kane / Vancouver, B.C.