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

adding compass example #5

wants to merge 1 commit into
base: master

adding compass example #5

wants to merge 1 commit into from


Copy link

FoamyGuy commented Feb 8, 2020

This adds the compass example referenced by issue #2. The sensor I have is actually a LIS3MDL, so I was unable to test this example specifically with the LIS2MDL. Both sensors (and some others) use the same .magnetic property to access the data so the example can be used by any of those sensors by using the appropriate import and sensor initialization. I believe this one should be working for the LIS2MDL.

@FoamyGuy FoamyGuy requested a review from adafruit/circuitpythonlibrarians Feb 8, 2020
jepler approved these changes Feb 9, 2020
Copy link

jepler left a comment

Good job using atan2() to get a heading over 360 degrees! I checked and assuming +X means east and +Y means north, the outputs would seem to match expectations. I don't have hardware to test with, though, so too cowardly to merge.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.