Hi!
I am using these line of code to continuously read the real-time acceleration values from the IMU(MPU-6050):
clear;a = arduino('COM5','Uno','Libraries',{'I2C','SPI'});imu = mpu6050(a,'SampleRate',50,'SamplesPerRead',5,'ReadMode','Latest');accelReadings = readAcceleration(imu);display(accelReadings);
It will returns one sample of the acceleration data on x, y, and z axes read from the sensor in units of m/s2 like this:
accelReadings = -2.3399 -0.5377 3.0201
Is there any possible way for me to retrive only the value of the x axis (the first value only)? I tried to treat it as an array but it is not working.
Also, can I fuse the data (estimate the orientation, quaternion, determine roll, pitch and yaw angles) of this type of this 6DOF sensor(MPU6050) as there is no magnetometer?
Thanks!
Best Answer