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

回答(1 个)

Nikhilesh
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.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by