microbit.compass.calibrate()
Starts the calibration process. An instructive message will be scrolled to the user after which they will need to rotate the device in order to draw a circle on the LED display.
microbit.compass.is_calibrated()
Returns True if the compass has been successfully calibrated, and returns False otherwise.
microbit.compass.clear_calibration()
Undoes the calibration, making the compass uncalibrated again.
microbit.compass.get_x()
Gives the reading of the magnetic force on the x axis, as a positive or negative integer, depending on the direction of the force.
microbit.compass.get_y()
Gives the reading of the magnetic force on the x axis, as a positive or negative integer, depending on the direction of the force.
microbit.compass.get_z()
Gives the reading of the magnetic force on the x axis, as a positive or negative integer, depending on the direction of the force.
microbit.compass.heading()
Gives the compass heading, calculated from the above readings, as an integer in the range from 0 to 360, representing the angle in degrees, clockwise, with north as 0.
microbit.compass.get_field_strength()
Returns an integer indication of the magnitude of the magnetic field around the device.