How to do a loop to read 10 data of acceleration from this code?

1 次查看(过去 30 天)
function [] = i2c_sensor()
a = arduino('COM3', 'UNO');
imu = mpu6050(a,'SampleRate',50,'SamplesPerRead',5,'ReadMode','Latest');
accelReadings = readAcceleration(imu);
display(accelReadings);
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Atomic, Molecular & Optical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by