Problem with de argument port?
古いコメントを表示
Encounter this error when i tried to connect my arduino board with my matlab: Unable to create a communication link with the serial port. Please check the input argument PORT and verify that a device is connected.
Can anyone solve this?
13 件のコメント
Juan Israel García Celedón
2021 年 11 月 28 日
編集済み: Walter Roberson
2021 年 11 月 28 日
Walter Roberson
2021 年 11 月 28 日
Have you used
arduinosetup
Juan Israel García Celedón
2021 年 11 月 28 日
Walter Roberson
2021 年 11 月 28 日
Which port did arduinosetup identify for use with your installed device? Have you tried hardcoding that port name in the arduino() call ?
Also, are you using Windows, or are you using Mac or Linux ?
Juan Israel García Celedón
2021 年 11 月 29 日
If arduinosetup was able to communicate with the port, but MATLAB is not able to communicate, then I do not know what is going on -- other than the possibility that the port is already in use ?
freeports = serialportlist("available")
Juan Israel García Celedón
2021 年 11 月 30 日
Walter Roberson
2021 年 11 月 30 日
Sorry, the only other possibility is that coming to mind is the possibility of mismatch on baud rate, if the arduino has somehow been configured to an unusual rate... but then I would expect problems with the configuration process.
Juan Israel García Celedón
2021 年 11 月 30 日
Walter Roberson
2021 年 11 月 30 日
Try using 'BaudRate' when you arduino()
Juan Israel García Celedón
2021 年 11 月 30 日
Walter Roberson
2021 年 11 月 30 日
a = arduino('COM4', 'Mega2560', 'BaudRate', 38400);
or whatever baud rate you had set the arduino to. Try 9600, 38400, 19200
Juan Israel García Celedón
2021 年 11 月 30 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Arduino Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
