f5857effc3
added new info on tilt to fill screen calibration as with https://github.com/lancaster-university/microbit-dal/pull/319#issue-262454889
30 lines
543 B
Markdown
30 lines
543 B
Markdown
# Calibrate Compass
|
|
|
|
Runs the compass calibration sequence.
|
|
|
|
```sig
|
|
input.calibrateCompass();
|
|
```
|
|
|
|
## Calibration
|
|
|
|
The calibration will ask you to draw a circle or fill the LED screen by tilting the
|
|
@boardname@.
|
|
|
|
If you are calibrating or using the compass near metal, it might
|
|
confuse the @boardname@.
|
|
|
|
## Example
|
|
|
|
This example runs the calibration when the user presses **A+B** buttons.
|
|
|
|
```blocks
|
|
input.onButtonPressed(Button.AB, () => {
|
|
input.calibrateCompass();
|
|
})
|
|
```
|
|
|
|
## See also
|
|
|
|
[compassHeading](/reference/input/compass-heading)
|