- bluetooth - https://www.mathworks.com/help/matlab/ref/bluetooth.html
- read - https://www.mathworks.com/help/matlab/ref/bluetooth.read.html
- readline - https://www.mathworks.com/help/matlab/ref/bluetooth.readline.html
I need help to export data from hc_06 for plotting my sensor datas
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have two sensors they send my bluetooth module 3 datas:
redValues/irValues/acceleration
int32_t/int32_t/float
Those are the data types and names.
I had problems with reading the data on matlab (I'm an unexperienced user).
0 Commenti
Risposte (1)
Ayush Modi
il 13 Gen 2024
Hi Ali,
I am assuming you are using "bluetooth" function to create bluetooth device object. You can read the data sent to the bluetooth device object using "read" or "readline" function. Here is an example to demonstrate how you can achieve this:
readline(device)
read(device,1,"uint16")
Please refer to the following MathWorks documentation for more information on:
I hope this helps!
2 Commenti
Ayush Modi
il 17 Gen 2024
Modificato: Ayush Modi
il 17 Gen 2024
I am assuming that the data is sent in a fixed format. You can use "NumBytesAvailable" property of the bluetooth object to check the size of the data which is available before reading the data. Once a complete packet is available, you can use "readline" or "read" function.
Vedere anche
Categorie
Scopri di più su Coexistence Modeling in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!