Matlab - Arduino Communicate --> Open failed: Port: COM6 is not available. No ports are available
4 views (last 30 days)
Show older comments
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/604335/image.png)
Hi , everyone I need your helps.
I am working on a project that reqiured matlab-arduino communicate. But ı took a weird error and ı didnt solve it.
Error :
Error using serial/fopen (line 72)
Open failed: Port: COM6 is not available. No ports are available.
Use INSTRFIND to determine if other instrument objects are connected to the requested device.
Error in Arduino (line 3)
fopen(s1);
when ı take this error. my arduino is connected to the COM6 but my matlab serial port says me it doesnt connect the COM6. thing that is weird, when ı started the matlab for the first , it working nice but when ı tried run the same script for second or third, it doesn't work . I mean ı take this error.
Please help me :/ it is so weird error. I haven't found it yet.
1 Comment
Rohan Kale
on 6 May 2021
Hi Arif,
Do you see the COM port being listed out in the Device Manager?
Moreover, see if you can find the port to which your Arduino board is connected by issuing the following command in the MATLAB command window:
>> seriallist
Check if the board is programmable by uploading a blank or blinky sketch from Arduino IDE. Try replugging your board to the machine.
Answers (0)
See Also
Categories
Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!