Skip to content

The repository will house all embedded drivers and interface for ICs and other peripherals

Notifications You must be signed in to change notification settings

UCSOAR/PeripheralDriversSubmodule

Repository files navigation

IMU Driver

Project Description

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.

Table of Contents

Functionalities

  • Accelerometer (G)
  • Gyroscope (dps)
  • Temperature (C)

Dependencies

Quick Setup

  1. Include the i2c_wrapper.hpp and lsm6dso.hpp
  2. Create a DRIVER_PARAMETER struct
  3. Enter all variables in the struct
  4. Create a I2C_Wrapper object with the hi2c handler created by the ioc
  5. Create a LSM6DSO_Driver object with the DRIVER_PARAMETER and I2C_Wrapper
  6. Check if isInitialized is TRUE1
  7. Check if maxSampFreqReached is FALSE2, 3
  8. Create a IMU_OUT struct to record the data
  9. Use LSM6DSO_Driver.updStatus() to check if data is available
  10. To read data use LSM6DSO_Driver.readSensor(&IMU_OUT)
  11. 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)

Contact

If you need any help or have any suggestions feel free to contact me at diogo.goto@ucalgary.ca or through Teams

About

The repository will house all embedded drivers and interface for ICs and other peripherals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8

Languages