Communication between two arduinos using bluetooth modules and matlab
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (1)
Harry Vancao
el 7 de Nov. de 2018
The HM-13 module that you are connecting to your arduino is not supported by the Arduino hardware support package. If you are interested in maintaining the two arduino setup that you currently have, the required hardware would be to use an HC-05 module connected to your master arduino to interface with the receiver arduino that is connected to either an HC-05 or an HC-06 module.
Your second suggestion of using one sampling arduino with an HM-13 module to interface with a HM-13 module connected to your PC seems to be much easier. As the HM-13 module is SPP compliant, you should be able to connect to this device using the "bluetooth" object found in the Instrument Control Toolbox.
0 comentarios
Ver también
Categorías
Más información sobre Modeling en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!