I don't have a Micro:bit up to now but I've read that the magnetometer chip in the Micro:bit is the MAG3110 from Freescale. We have an Espruino module for the MAG3110 which supports all features of the sensor (e.g. different operation modes). It's fully tested with a MAG3110 evaluation board.
@Stev
If the Micro:bit has enough memory for using the MAG3110-module then you could experiment with this.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I don't have a Micro:bit up to now but I've read that the magnetometer chip in the Micro:bit is the MAG3110 from Freescale. We have an Espruino module for the MAG3110 which supports all features of the sensor (e.g. different operation modes). It's fully tested with a MAG3110 evaluation board.
@Stev
If the Micro:bit has enough memory for using the MAG3110-module then you could experiment with this.