Communication between two arduinos using bluetooth modules and matlab

Hi guys!

I have made a wireless arduino system using two setups:

  • Master: An arduino uno + HM-13 bt module which samples some sensor data and sends some commands to reciever.

  • Reciever: An arduino pro mini + HM-13 bt module which recieves some input.

This works when both arduinos is running code from arduino IDE. However, i want to build a matlab App to control the Master arduino and i have little to no idea how to get matlab to use the HM-13 connected to the Master (Uno), as the sender (So that i get HM-13 to HM-13 communication).

Although i am not new to matlab, i am unexperiences in different types of communication interfaces available.

I have read the documentation for the the bluetooth object available in matlab, however i find it someway hard tu understand all the technoicalities. To my understanding it is meant to connect FROM a already installed bluetooth device such as dongle on built-in chip TO a mudule such as the HM-13. Is this true or can i configure matlab to use the HM-13?

The matlab documentation for arduino states that you can create custom libraries; is it nessesary to convert, for example, SoftwareSerial.h library from arduino to matlab? And if so, can i then just use the same commands in matlab as i did in the arduino IDE?

Although HM-13 to HM-13 is preferred, would it, on the other hand, be possible/easier to just connect a bluetooth dongle to my PC and create a dongle TO HM-13 (Reciever) connection and just use the arduino uno as the sampling device?

If more information is nessesary, this will gladly be provided! Any help or pointers are very much appreciated!

Best regards Alex

PS. i am unaware whether this sould be in the "Interfacing" section.

You have matlab talking to one Arduino, using some process that you failed to disclose.

You have some code on that Arduino that you failed to share.

That code communicates with the HM-13 in some undefined way.

The HM-13s may, or may not actually be paired.

The other HM-13 communicates with the other Arduino in some undefined way, because you failed to post that code, either.

That code does something with the data that you failed to disclose, providing proof that the process does not work, that you failed to share.

Do you REALLY expect help?

Dalsgaard93:
I want to build a matlab App to control the Master arduino and i have little to no idea how to get matlab to use the HM-13 connected to the Master (Uno), as the sender (So that i get HM-13 to HM-13 communication).

It seems like you need to write Matlab code to send messages to the Arduino and code on the Arduino to receive those messages and pass them on using Bluetooth.

I know nothing about Matlab but Serial Input Basics illustrates simple reliable ways to receive data. The technique in the 3rd example will be the most reliable.

...R