The LSM6DSO_Driver is a C++ library designed to simplify interaction with the LSMDSO6 sensor. This driver abstracts the complexity of the sensor's functionality, reducing the need to reference the datasheet for basic operations. It provides an intuitive interface to get your project up and running quickly.
For a quick start, refer to the Quick Setup section or check the main_i2c_test.cpp file for a usage example.
Note: The provided example is not meant to be built directly, but rather to illustrate the steps required to initialize and use the driver.
- Accelerometer (G)
- Gyroscope (dps)
- Temperature (C)
- I2C Wrapper by Diogo Goto
- Include the
i2c_wrapper.hppandlsm6dso.hpp - Create a
DRIVER_PARAMETERstruct - Enter all variables in the struct
- Create a
I2C_Wrapperobject with the hi2c handler created by the ioc - Create a
LSM6DSO_Driverobject with theDRIVER_PARAMETERandI2C_Wrapper - Check if
isInitializedis TRUE1 - Check if
maxSampFreqReachedis FALSE2, 3 - Create a
IMU_OUTstruct to record the data - Use
LSM6DSO_Driver.updStatus()to check if data is available - To read data use
LSM6DSO_Driver.readSensor(&IMU_OUT) - DONE!
1 - if isInitialized is FALSE use LSM6DSO_DRIVER.updConfigs(DRIVER_PARAMETER) method and repeat step 5
2 - if maxSampFreqReached is TRUE adjust sampling frequency in the DRIVER_PARAMETER and call LSM6DSO_DRIVER.updConfigs(DRIVER_PARAMETER) and repeat step 6
3 - Even when its TRUE it's still going to work but the sampling frequency will be the 6.66KHz (The maximum sampling frequency available)
If you need any help or have any suggestions feel free to contact me at diogo.goto@ucalgary.ca or through Teams