作者kobegreat ()
看板MATLAB
标题[设定]MATLAB和蓝芽做连接
时间Wed Jun 1 02:49:34 2016
各位好
我最近有再用蓝芽跟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://webptt.com/cn.aspx?n=bbs/MATLAB/M.1464720578.A.57F.html
1F:推 gR7P4zXH: 笔电内建蓝芽?要不要试用port=Bluetooth(...);fopen(por 06/11 13:15
2F:→ gR7P4zXH: t); 06/11 13:15