Poblems with H05 bluetooth module

Hi!
I'm trying to receive data from a sesnor in an Arduino UNO over H05 module using a dongle in my PC. When I receive data in Putty software there is no problem but when I try to establish the communication using matlab, no data is being received. Any idea of the problem? I've attached the error in Matlab in order to give further details.
Serial Port Object : Serial-COM14
Communication Settings
Port: COM14
BaudRate: 38400
Terminator: 'CR/LF'
Communication State
Status: open
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
Warning: Unsuccessful read: A timeout occurred before the Terminator was reached..
Subscripted assignment dimension mismatch.
Error in Medida_Bluetooth_hcsr04>Medir_Callback (line 104)
handles.distancia(i)=fscanf(s,'%f');

4 Kommentare

Walter Roberson
Walter Roberson am 28 Mär. 2017
Is it possible that the line terminator is just LF or just CR ?
I have also tried. In addition to this, I don't understand this error.
>> instrhwinfo('Bluetooth','HC-05')
Error using instrhwinfo (line 294)
Specified ADAPTOR was not found or could not be loaded.
Chinmayi Lanka
Chinmayi Lanka am 30 Mär. 2017
Which release of MATLAB are you using?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Gefragt:

am 28 Mär. 2017

Kommentiert:

am 30 Mär. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by