bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
602 stars 284 forks source link

Option for compass in vertical mode. #790

Closed mhldr closed 1 year ago

mhldr commented 1 year ago

According to https://support.microbit.org/support/solutions/articles/19000008874-calibrating-the-micro-bit-compass "The micro:bit compass is configured to be used in a horizontal orientation."

There are a lot of buggy kits out there (such as the :MOVE) that mount the board vertically and it would be really nice to still be able to use the compass in these.

Would there be objections to allowing the compass to default to horizontal but to allow users to configure it for vertical use when calibrating it?

Or would it be better for such buggies to not use the same style of calibration routine, due to issues with the algorithm's use of accelerometers on a moving platform? In which case would it be possible to expose the raw sensor data and suggest an alternative calibration method? I understand the makecode blocks to get "magnetic force" are returning calibrated data not the raw data.

mhldr commented 1 year ago

Sorry this should have been raised in https://github.com/lancaster-university/microbit-dal/