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

1 回表示 (過去 30 日間)
WAN NOR NAZIRA MUSTAPA KAMAL
WAN NOR NAZIRA MUSTAPA KAMAL 2021 年 1 月 29 日
function [] = i2c_sensor()
a = arduino('COM3', 'UNO');
imu = mpu6050(a,'SampleRate',50,'SamplesPerRead',5,'ReadMode','Latest');
accelReadings = readAcceleration(imu);
display(accelReadings);
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeAtomic, Molecular & Optical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by