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!