Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temperature readout #10

Open
scboulogne opened this issue Mar 28, 2024 · 0 comments
Open

temperature readout #10

scboulogne opened this issue Mar 28, 2024 · 0 comments

Comments

@scboulogne
Copy link

I have added and tested the temperature readout on this sensor.

This required changes in Adafruit_LIS2MDL.h and .cpp for the new public method
float Adafruit_LIS2MDL::readTemperature(void);
see diffs for my version of these files below (sorry, as .txt because for all my attempts, they were refused to get attached with extension .patch as unrecognized file types ...).

NB: this is similar to float Adafruit_MMC5603::readTemperature(void); but much simpler because the temperature registers on LIS2MDL are refreshed automatically

NB: it is possible (see comments in the .cpp) to store the result in the fourth (unused) element of event.data but it is unclear to me whether that may interfere with smth else.

Adafruit_LIS2MDL-h.txt
Adafruit_LIS2MDL-cpp.txt

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

No branches or pull requests

1 participant