Communication between two arduinos using bluetooth modules and matlab
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Harry Vancao
2018-11-7
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!