Skip to content

Conversation

@b-atteryacid
Copy link

A class has been added which defines member functions for interfacing with and reading from the LIS3MDLTR magnetometer.
Use LIS3MDLTR_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 Init on the class once and supply an SPI handle and its chip select pin (make sure to keep the SPI clock frequency below 10MHz)
  3. Call ReadAllSensorRegs to read into a supplied buffer
  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.

Can we get a getter function for the temp as well? I dont know if we will use it but would be nice to have. And as I said just to have it on here also, rewording the ReadAllSensorRegs() to something like getMagMeasurements()

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