[設定]MATLAB和藍芽做連接
各位好
我最近有再用藍芽跟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
06/11 13:15, 1F
→
06/11 13:15, , 2F
06/11 13:15, 2F
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章