As you know, Polaris is a bright star shining in the northern Hemisphere. It’s at the end of the Little Dipper's handle.
It is commonly called the North Star or Pole Star.
It marks the location of the sky's north pole, the point around which the whole sky turns. That's why you can always use Polaris to find the north direction.
Let's create a compass using Microbit and look for Polaris which is located in the north direction.

Go to the page microbit.org
and start programming your compass.
Here you have the coding programming
Click on the image to enlarge it.

The following code is to calibrate the compass in case you need it:
Click on the image to enlarge it.

Here you have a video tutorial about how to code a compass with Microbit:
Or watch the next video and follow the steps to create the compass: