[設定]MATLAB和藍芽做連接

看板MATLAB作者時間9年前 (2016/06/01 02:49), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串1/1
各位好 我最近有再用藍芽跟matlab做結合 附上我的程式碼 clc;clear;close all; SerPIC = serial('COM6'); %<--change this appropriately set(SerPIC,'BaudRate', 9600, 'DataBits', 8, 'Parity', 'none','StopBits', 1, 'FlowControl', 'none'); fopen(SerPIC); %--open the serial port to the PIC 卻出現以下訊息 Error using serial/fopen (line 72) Open failed: Port: COM6 is not available. Available ports: COM10. Use INSTRFIND to determine if other instrument objects are connected to the requested device. Error in test1 (line 5) fopen(SerPIC); %--open the serial port to the PIC 程式碼裡的com改成com10也一樣不行 可是我用rs232一樣的matlab程式碼可以傳值 藍芽接終端機也可以傳值 不知道問題到底出在哪裡 想請問大家有什麼辦法可以解決嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.116.179.121 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1464720578.A.57F.html

06/11 13:15, , 1F
筆電內建藍芽?要不要試用port=Bluetooth(...);fopen(por
06/11 13:15, 1F

06/11 13:15, , 2F
t);
06/11 13:15, 2F
文章代碼(AID): #1NJTp2L_ (MATLAB)
文章代碼(AID): #1NJTp2L_ (MATLAB)