Skip to main content
Visitor II
March 14, 2019
Question

Why the gyroscope (lsm6ds3) does not measure correctly on the axis Z?

  • March 14, 2019
  • 1 reply
  • 681 views

All values on the axis Z are multiples of 256. If you rotate the gyroscope(lsm6ds3) on an axis with angular velocity <256, the value will be 0. I do not observe this on other axes. The values from the gyroscope are shown in the attach figure.

I read using the standard library: link. Code that reads data:

lsm6ds3_gy_flag_data_ready_get(dev_ctx, &reg);
 
 if(!reg)
 
 return 1;
 
 
memset(data_raw_angular_rate.u8bit, 0x00, 3 * sizeof(int16_t));
 
lsm6ds3_angular_rate_raw_get(dev_ctx, data_raw_angular_rate.u8bit);
 
for(int x = 0; x < number_axis; x++)
 
angular_rate[x] =
 
 data_raw_angular_rate.i16bit[x]

What is the reason for this behavior?

P.s. blue - axis Y, red - axiz X, green - axis Z.

    This topic has been closed for replies.

    1 reply

    ST Employee
    May 13, 2019

    Hi, are you sure you are reading all the axis correctly? I mean, 2 bytes for x axis, 2 bytes for y axis and 2 bytes for z axis? If you are reading 0 under 256, it's maybe due to last byte missing. However, I suggest you to point out your remark on github forum. Regards