pert
May 19, 2019, 7:17am
12
OK, strange. Is MatLab running when this error occurs?
It seems similar to this bug:
opened 04:15AM - 05 May 19 UTC
closed 08:12AM - 18 Jul 19 UTC
Type: Bug
Type: Regression
Component: Uploading
Component: IDE Serial monitor
Arduino IDE Hourly Build 2019/04/18 12:33 / Arduino IDE 1.9.0-beta build 105, Wi… ndows 10 64 bit
1. Plug the USB cable of a native USB (Leonardo, MKR, Due (Native USB Port)) into your computer.
1. Tools > Serial Monitor
1. Unplug the USB cable.
1. Close Serial Monitor (to avoid https://github.com/arduino/Arduino/issues/8518 when using Arduino IDE 1.9.0-beta).
1. Plug the USB cable of the board into your computer. It doesn't matter whether this is done before or after closing Serial Monitor.
1. Sketch > Upload
The upload process completes successfully, but the Arduino IDE doesn't recognize this and after a delay the upload is shown to have failed with the error:
```
Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
```
You must now exit the Arduino IDE and start it again before you can upload without the spurious failure.
When using Arduino IDE 1.8.9 or the Hourly Build, disconnecting the board while Serial Monitor is open and then reconnecting causes multiple duplicate ports to be shown in the **Tools > Port** menu. This does not occur with Arduino IDE 1.9.0-beta, but the spurious upload failure still does occur.
![Clipboard02](https://user-images.githubusercontent.com/8572152/57188314-5e304800-6eb1-11e9-8c5d-50f3c1ed06f1.png)
The duplicate ports and spurious upload failure issue does not occur with Arduino IDE 1.8.8.
Originally reported at:
- https://forum.arduino.cc/index.php?topic=613070
- https://forum.arduino.cc/index.php?topic=443558.msg4160634#msg4160634
That bug doesn't occur after restarting the Arduino IDE though. My thought is that maybe Matlab is somehow triggering the bug by its attempts to communicate with the board.