Skip to content

Conversation

@b-atteryacid
Copy link

A class has been added which defines member functions for interfacing with and reading from the LSM6DO32 6-axis IMU (acceleration and gyro).
Use LSM6DO32_Driver::Inst() to access functionality.

To test:

  1. Create a loop that periodically reads from the sensor and prints the result
  2. Flash onto the devboard
  3. Verify the readings respond properly to changes in the environment
  4. Optionally, reduce the period of the loop until duplicate or incorrect readings are received to find max sample rate

To integrate:

  1. Include the header file containing the class
  2. Call Initon the class once and supply an SPI handle and its chip select pin (make sure to keep the SPI clock frequency below 10MHz)
  3. Either call ReadAllSensorRegs to read into a supplied buffer, or call ReadFIFOs to read one 6-byte 3-axis measurement, which will either be from the gryoscope or accelerometer
  4. Optionally, call GetDataFromBuf to interpret the desired info from the buffer into a struct

Copy link

@AndreyDiDev AndreyDiDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename "GetDataFromBuf" and "RealAllSensorRegs"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants