필터 지우기
필터 지우기

function serialportlist is not working

조회 수: 13 (최근 30일)
Stijn Haenen
Stijn Haenen 2020년 1월 24일
댓글: Walter Roberson 2020년 1월 25일
When I use the function 'serialportlist' to identify the serial ports on my laptop i get a 1x0 empty string array.
ports=serialportlist
ports =
1×0 empty string array
I think, I should get at least 2 ports, because I have 2 USB ports on my laptop.
Im using matlab 2019b.
Do i need to instal some packages for using serialportlist?
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 1월 24일
USB by itself is not enough: you would need to have a connected device that is responding as offering a virtual com port.

댓글을 달려면 로그인하십시오.

채택된 답변

Stijn Haenen
Stijn Haenen 2020년 1월 25일
I do not know if i have such a device. I want to play audio files via different USB speakers, do you have any tips how to do this?
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 1월 25일
USB speakers would not advertise themselves as offering virtual com port services so using serialport() would not be appropriate.
See https://www.mathworks.com/help/audio/ref/audioplayerrecorder.getaudiodevices.html

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by