2022-11-28 04:42 AM
* Initialize the LSM6DSL sensor */
LSM6DSL_Init(&MotionSensor);
/* Configure the LSM6DSL accelerometer (ODR, scale and interrupt) */
LSM6DSL_ACC_SetOutputDataRate(&MotionSensor, 26.0f); /* 26 Hz */
LSM6DSL_ACC_SetFullScale(&MotionSensor, 4); /* [-4000mg; +4000mg] */
LSM6DSL_ACC_Set_INT1_DRDY(&MotionSensor, ENABLE); /* Enable DRDY */
LSM6DSL_ACC_GetAxesRaw(&MotionSensor, &axes); /* Clear DRDY */
this code is used for another gyroscope in the example in the link. I'm trying to use this code for my im330dhcx but these parts are getting errors in CubeIde. How can I solve it? (I am the version I adapted io_ctx . BusType = ISM330DHCX_I2C_BUS;
io_ctx . Address = ISM330DHCX_I2C_ADD_L;
io_ctx . Init = HAL_I2C2_Init;
io_ctx . DeInit = HAL_I2C_DeInit;
io_ctx . ReadReg = HAL_I2C_ReadReg;
io_ctx. WriteReg = HAL_I2C2_WriteReg;
io_ctx . GetTick = BSP_GetTick;)
2022-11-28 04:44 AM
2022-12-22 05:53 AM
Hi,
I have the same problem. Have you found a solution?
Best
P