Collecting IMU data from two Arduino Nano 33 Ble Senses over Bluetooth at the same time
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Nikhilesh
el 29 de Mzo. de 2023
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 comentarios
Ver también
Categorías
Más información sobre Digital Filter Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!