Magnetometer not working and self-test procedure #524
Unanswered
TheVonKanar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! First off, thanks for the book, as a complete beginner in embedded programming, it helps a lot!
Now, I'm stuck on chapter 9 (led compass) because my magnetometer outputs values that doesn't make sense. I tried the solutions of the book, tried flashing compass applications from the official microbit website, but nothing works.
For example, using the official compass app, I do the calibration, I keep the microbit horizontal, then point the device to the north and it reads like 65°, then I turn it to the south and sometimes it gives me almost the same value like 40°, sometimes 240°. There's no consistency to it, and I'm having a hard time finding the quadrant directions since values are all over the places.
I tried doing the tests outside, far from any metallic parts or magnets, but I get the same inconsistent results.
Maybe it's just broken, or maybe (I'm doing circles inside my own head on this) since I'm in New Zealand, southern hemisphere, the calculations are not the same, like old compasses.
Anyway, I stumbled onto the Self-Test procedure on the datasheet (page 25), and thought it could be a good way to test if the magnetometer is actually working properly, but I'm a bit lost on how to execute the test procedure in rust?
Sorry for the rambling and thanks again for this book!
Beta Was this translation helpful? Give feedback.
All reactions