Collecting IMU data from two Arduino Nano 33 Ble Senses over Bluetooth at the same time
16 ビュー (過去 30 日間)
古いコメントを表示
I am trying to collect IMU data from two Arduino Nano 33 BLE Senses at the same time over bluetooth. I have been successful in collect data from one sensor over Bluetooth and have been able to implement this in app designer as well. I hope to be able to collect from both sensors at once. I have tried to use the Parallel Computing Toolbox, but have not been successful. I have some of my collection code for one sensor below. I am able to get two sensors connected in matlab over bluetooth, but I don't know how to collect from both at once.
a=arduino("EAD91D0297DC") %Connect to the Arduino over Bluetooth
lsmObj = lsm9ds1(a,"Bus",1,"OutputFormat","matrix","SamplesPerRead",250) %Change output format to Matrix
acceleration=[]; %preallocate arrays
angularVelocity=[]; %preallocate arrays
magnetometer=[]; %preallocate arrays
counter=1;
[acceleration,angularVelocity,magnetometer,timeStamps,overrun] = readData(lsmObj)
function [acceleration,angularVelocity,magnetometer,timeStamps,overrun] = readData(lsmObj1)
counter=1;
% Loop continuously to read data from the device
while counter<1001
% Read the acceleration and angular velocity data
[acceleration(counter:(counter+249),:), angularVelocity(counter:(counter+249),:), magnetometer(counter:(counter+249),:), timeStamps(counter:(counter+249),:), overrun] = read(lsmObj1)
counter=counter+250;
end
end
0 件のコメント
回答 (1 件)
Nikhilesh
2023 年 3 月 29 日
Hi Stephen,
As per my knowledge it is not possible for now to collect IMU data from two Arduino Nano 33 BLE Senses at the same time over bluetooth.
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!